Repository navigation
refactor(ra): add sync_pr.py and the common-file sync to common_sync.py - #485
Merged
hdamker merged 1 commit intoOct 23, 2026
Conversation
hdamker
merged commit Oct 23, 2026
9d99e3e
into
camaraproject:release-automation-refactor
8 checks passed
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
Adds the two modules the
finalizejob will call, with tests. They are not wired into the post-release or common-sync steps yet; the next PR does that when it replacesupdate-issue,post-resultandcreate-sync-pr.release_automation/scripts/sync_pr.pyreplaces the twogithub-scriptblocks and the shell step ofcreate-sync-pr: copy the README release-information block and the release-cycle CHANGELOG from the tag, pushpr-to-main/<tag>, open the PR with the same title, body and labels. The result is aSyncPrOutcomewhosestatusiscreated,failedorno_changes. Two differences:mainand force-pushed, and an open PR for it is reused (a re-run used to fail ongit push)failed; before, it failed the job and left the status empty ("unknown")release_automation/scripts/common_sync.pygains the common sync itself, next to the detection it already had (sync_common(), replacing the inline Python and shell of the common-sync steps inupdate-issue): clone the Commonalities release, copyartifacts/common/*.yaml, write.sync-manifest.yaml, rebuildsync-common/<release>frommain, close superseded sync PRs, open or reuse the PR. Its interface takes a git client and a GitHub client and no release-automation types. Fixes from the earlier review of this feature, each with a test:mainbefore the files are copiedfailed, not only a failed Commonalities checkout, so the caller can postcommon_sync_failedfor all of themcode/common/that the release does not provide are named in a warning and in the PR body (not deleted)sync-common/<release>head;planusedstartswith("sync-common/"). This lookup moves from a shell step inplanintocommon_sync.pySupporting changes:
GitOperationstakes aremote_url, shallow clones,create_branch(reset=True),has_changes()andpush(force=True);GitHubClientgetsfind_open_pr,list_open_prs,create_pr,add_pr_labelsandclose_pr. The git-level tests run real git against local bare repositories (release_automation/tests/local_git.py);conftest.pykeeps the developer's git config out of them.Which issue(s) this PR fixes:
Part of #476
Special notes for reviewers:
Targets
release-automation-refactor. The only change on a running path is the sync-PR lookup inplan, which the canary reaches only when the cache is stale. The new modules run for the first time in the manual end-to-end test after the next PR.Changelog input
Additional documentation