You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a private and a public repository that share part of the codebase. The workflow is one-way only: it syncs from the public to the private repository.
core.workflow(
name = "pull",
origin = git.github_origin(
url = sourceUrl,
ref = "main",
),
destination = git.github_pr_destination(
url = destUrl,
destination_ref = "main",
pr_branch = "copybara_from_public_repo",
title = "Copybara - code sync from public repo",
body = "This PR is auto-generated by Copybara.",
integrates = [],
),
origin_files = glob(
include = filesToSync,
exclude = excludedFiles
),
destination_files = glob(
include = filesToSync,
exclude = excludedFiles
),
authoring = authoring.pass_thru("author <[email protected]>"),
transformations = [
metadata.restore_author("ORIGINAL_AUTHOR", search_all_changes = True),
metadata.use_last_change(author=True, message=True, default_message=None),
],
mode = ITERATIVE
)
The issue arises when a private function is added to the private codebase. Copybara tries to delete it because it is not present in the public codebase, and the file is included in the sync.
How can I preserve the private codebase while keeping the file in sync?
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks @hsudhof ! Do you have some more information regarding the merge_mode? I can't find it in the reference.
About patches, I've already excluded them because we don't want to generate a diff file in advance for every files we're maintaining, since the drift between the private and the public repo is quite huge.
Hi, I have a private and a public repository that share part of the codebase. The workflow is one-way only: it syncs from the public to the private repository.
The issue arises when a private function is added to the private codebase. Copybara tries to delete it because it is not present in the public codebase, and the file is included in the sync.
How can I preserve the private codebase while keeping the file in sync?
Thanks!
The text was updated successfully, but these errors were encountered: