authoring not working
See original GitHub issueWe want to use copybara with Gitlab. The workflow I imagine, since copybare doesn’t support Gitlab as good as Github, is the following:
- A user creates a pull request on the external repo.
- We use copybara to copy (CHANGE_REQUEST) the branch of the pull request to our internal repo.
- We do a pull request.
- We merge this pull request.
- We sync back (ITERATIVE) our internal source to the external repo.
However, I tried this and the only thing that gets displayed at the external repo is a commit of the “Merge branch ‘external-001’ into ‘master’”. There is no sign of the original author or of the original commit of the author.
I only see the commit of the original author in our internal repo.
My copy.bara.sky looks like this:
internalUrl = "git@gitlab.com:example/internal_test_repo.git"
externalUrl = "git@gitlab.com:example/external_test_repo.git"
core.workflow(
name = "default",
origin = git.origin(
url = internalUrl,
ref = "master",
),
destination = git.destination(
url = externalUrl,
fetch = "master",
push = "master",
),
origin_files = glob(["project_001/share_001/**", "project_001/share_002/**", "project_002/subproject_002/**", "external/README.md"], exclude = ["**/key.txt"]),
destination_files = glob(["**"], exclude = ["external_only.txt"]),
mode = "ITERATIVE",
authoring = authoring.pass_thru(default = "Example <example@gmail.com>"),
transformations = [
# Move to root of OSS repo.
core.move("external/README.md", "README.md"),
core.move("project_002", ""),
metadata.restore_author(label='ORIGINAL_AUTHOR', search_all_changes=True),
],
)
core.workflow(
name = "import_branch",
origin = git.origin(
url = externalUrl,
ref = "external-001"
),
destination = git.destination(
url = internalUrl,
fetch = "master",
push = "external/external-001",
),
origin_files = glob(["**"], exclude = ["bla.txt"]),
destination_files = glob(["project_001/share_001/**", "project_001/share_002/**", "project_002/subproject_002/**", "external/README.md"], exclude = ["**/key.txt"]),
mode = "CHANGE_REQUEST",
authoring = authoring.pass_thru(default = "Example <example@gmail.com>"),
transformations = [
# Move from root of OSS repo.
core.move("README.md", "external/README.md"),
core.move("subproject_002", "project_002/subproject_002"),
metadata.save_author(label='ORIGINAL_AUTHOR'),
],
)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Troubleshoot co-authoring in Office - Microsoft Support
Troubleshoot co-authoring · Click the File tab on the ribbon, click Options to display the Word Options dialog box. · Click Trust Center,...
Read more >Co-authoring troubleshooting tips - Breadcrumb Digital
Another reason why co-authoring may not be working is if a Word document does not have the 'Store random numbers to improve Combine...
Read more >How SharePoint Co-authoring Works and Fixing Common ...
Common problems that cause co-authoring to not work · 1. Checking out the document · 2. Unsupported document format · 3. Using different...
Read more >SharePoint co-authoring not working: How to fix
Common reasons why your co-authoring may not be working: · AutoSave is turned off · You're not using the right document format ·...
Read more >Co-Authoring and Synced Documents | by Darrell as a Service
More often than not, colleagues bump into each other, exclaiming “oh, there's another user working on this document with me. I…
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I found a solution, not sure though if this is the optimal/recommended solution. I use
first_parent = False,
ingit.origin()
and I useITERATIVE
mode for both processes. First for getting the external branch with all commits to the internal repository and than to sync back all commits from the internal repository to the external repository. This way I have not only the merge commits, but all commits, including the original author.Maybe we could add an example like this to the examples? Of course only if this is the optimal/recommended solution for the task.
My copy.bara.sky looks like this now:
I see. You could make it work with some scripting wrapping Copybara (that we could add native if this starts to be common pattern).
You import to a branch as you do now. Do the merge manually (but in the merge you add the integrate label or any text you want).
Then in the way out you run copybara and after that in the script you git log looking for that label and rewrite history to add a fake merge with the original PR. This would be ~40-50 lines of bash, no much.