From 2db9c1067be255ef680ec0d73daf46a53cba0b90 Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Sun, 1 Mar 2026 18:45:39 +0100 Subject: [PATCH 1/2] fix: rename post-release sync branch to tmp/sync-main/{tag} Avoids confusion with permanent pre-release/{tag} pointer branches. The tmp/ prefix signals the branch is disposable after PR merge. Labels and descriptive text unchanged. --- .github/workflows/release-automation-reusable.yml | 2 +- release_automation/docs/technical-architecture.md | 2 +- release_automation/scripts/post_release_syncer.py | 2 +- .../tests/test_post_release_syncer.py | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-automation-reusable.yml b/.github/workflows/release-automation-reusable.yml index d293783..532295a 100644 --- a/.github/workflows/release-automation-reusable.yml +++ b/.github/workflows/release-automation-reusable.yml @@ -1515,7 +1515,7 @@ jobs: exit 0 fi - SYNC_BRANCH="post-release/${RELEASE_TAG}" + SYNC_BRANCH="tmp/sync-main/${RELEASE_TAG}" # Create branch, stage, commit, push git checkout -b "$SYNC_BRANCH" diff --git a/release_automation/docs/technical-architecture.md b/release_automation/docs/technical-architecture.md index aa8ae40..f593d7d 100644 --- a/release_automation/docs/technical-architecture.md +++ b/release_automation/docs/technical-architecture.md @@ -503,7 +503,7 @@ Creates a sync PR to main after release publication. - Release-specific CHANGELOG: `CHANGELOG/CHANGELOG-rX.md` (X = cycle number from release tag) - README Release Information section update (between delimiters) -**Branch:** `post-release/rX.Y` created from main. +**Branch:** `tmp/sync-main/rX.Y` created from main. **Merge policy:** Human approval required (no auto-merge). diff --git a/release_automation/scripts/post_release_syncer.py b/release_automation/scripts/post_release_syncer.py index 887f4dc..6876efb 100644 --- a/release_automation/scripts/post_release_syncer.py +++ b/release_automation/scripts/post_release_syncer.py @@ -62,7 +62,7 @@ def create_sync_pr( Returns: SyncPRResult with PR details or error """ - sync_branch = f"post-release/{release_tag}" + sync_branch = f"tmp/sync-main/{release_tag}" try: # Step 1: Create sync branch from main diff --git a/release_automation/tests/test_post_release_syncer.py b/release_automation/tests/test_post_release_syncer.py index a85b7ff..d5149b7 100644 --- a/release_automation/tests/test_post_release_syncer.py +++ b/release_automation/tests/test_post_release_syncer.py @@ -117,7 +117,7 @@ def test_sync_changelog_success(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "post-release/r4.1", + "tmp/sync-main/r4.1", "r4.1" ) @@ -125,7 +125,7 @@ def test_sync_changelog_success(self, syncer, mock_github_client): mock_github_client.update_file.assert_called_once() call_kwargs = mock_github_client.update_file.call_args.kwargs assert call_kwargs["path"] == "CHANGELOG/CHANGELOG-r4.md" - assert call_kwargs["branch"] == "post-release/r4.1" + assert call_kwargs["branch"] == "tmp/sync-main/r4.1" def test_sync_changelog_not_found(self, syncer, mock_github_client): """CHANGELOG not found - returns False.""" @@ -133,7 +133,7 @@ def test_sync_changelog_not_found(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "post-release/r4.1", + "tmp/sync-main/r4.1", "r4.1" ) @@ -147,7 +147,7 @@ def test_sync_changelog_update_fails(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "post-release/r4.1", + "tmp/sync-main/r4.1", "r4.1" ) @@ -157,7 +157,7 @@ def test_sync_changelog_invalid_release_tag(self, syncer, mock_github_client): """Invalid release tag format - returns False.""" result = syncer._sync_changelog( "release-snapshot/invalid-abc123", - "post-release/invalid", + "tmp/sync-main/invalid", "invalid" ) @@ -172,7 +172,7 @@ def test_create_pr_success(self, syncer, mock_github_client): """Successfully creates PR.""" mock_github_client._run_gh.return_value = "https://github.com/test-org/test-repo/pull/42" - result = syncer._create_pr("r4.1", "post-release/r4.1") + result = syncer._create_pr("r4.1", "tmp/sync-main/r4.1") assert result is not None assert result["number"] == 42 @@ -183,7 +183,7 @@ def test_create_pr_already_exists(self, syncer, mock_github_client): mock_github_client._run_gh.side_effect = GitHubClientError("PR already exists") mock_github_client.find_pr_for_branch.return_value = 99 - result = syncer._create_pr("r4.1", "post-release/r4.1") + result = syncer._create_pr("r4.1", "tmp/sync-main/r4.1") assert result is not None assert result["number"] == 99 From ee2d1ca03dc4543ed70e32247f9d07ea53a89078 Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:45:17 +0100 Subject: [PATCH 2/2] fix: rename post-release sync branch to pr-to-main/{release_tag} Update branch naming from tmp/sync-main/{tag} to pr-to-main/{release_tag} as agreed in RM#402 review discussion. --- .github/workflows/release-automation-reusable.yml | 2 +- release_automation/docs/technical-architecture.md | 2 +- release_automation/scripts/post_release_syncer.py | 2 +- .../tests/test_post_release_syncer.py | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-automation-reusable.yml b/.github/workflows/release-automation-reusable.yml index 532295a..f40442f 100644 --- a/.github/workflows/release-automation-reusable.yml +++ b/.github/workflows/release-automation-reusable.yml @@ -1515,7 +1515,7 @@ jobs: exit 0 fi - SYNC_BRANCH="tmp/sync-main/${RELEASE_TAG}" + SYNC_BRANCH="pr-to-main/${RELEASE_TAG}" # Create branch, stage, commit, push git checkout -b "$SYNC_BRANCH" diff --git a/release_automation/docs/technical-architecture.md b/release_automation/docs/technical-architecture.md index f593d7d..47d03b9 100644 --- a/release_automation/docs/technical-architecture.md +++ b/release_automation/docs/technical-architecture.md @@ -503,7 +503,7 @@ Creates a sync PR to main after release publication. - Release-specific CHANGELOG: `CHANGELOG/CHANGELOG-rX.md` (X = cycle number from release tag) - README Release Information section update (between delimiters) -**Branch:** `tmp/sync-main/rX.Y` created from main. +**Branch:** `pr-to-main/rX.Y` created from main. **Merge policy:** Human approval required (no auto-merge). diff --git a/release_automation/scripts/post_release_syncer.py b/release_automation/scripts/post_release_syncer.py index 6876efb..b22df84 100644 --- a/release_automation/scripts/post_release_syncer.py +++ b/release_automation/scripts/post_release_syncer.py @@ -62,7 +62,7 @@ def create_sync_pr( Returns: SyncPRResult with PR details or error """ - sync_branch = f"tmp/sync-main/{release_tag}" + sync_branch = f"pr-to-main/{release_tag}" try: # Step 1: Create sync branch from main diff --git a/release_automation/tests/test_post_release_syncer.py b/release_automation/tests/test_post_release_syncer.py index d5149b7..a9d54ec 100644 --- a/release_automation/tests/test_post_release_syncer.py +++ b/release_automation/tests/test_post_release_syncer.py @@ -117,7 +117,7 @@ def test_sync_changelog_success(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "tmp/sync-main/r4.1", + "pr-to-main/r4.1", "r4.1" ) @@ -125,7 +125,7 @@ def test_sync_changelog_success(self, syncer, mock_github_client): mock_github_client.update_file.assert_called_once() call_kwargs = mock_github_client.update_file.call_args.kwargs assert call_kwargs["path"] == "CHANGELOG/CHANGELOG-r4.md" - assert call_kwargs["branch"] == "tmp/sync-main/r4.1" + assert call_kwargs["branch"] == "pr-to-main/r4.1" def test_sync_changelog_not_found(self, syncer, mock_github_client): """CHANGELOG not found - returns False.""" @@ -133,7 +133,7 @@ def test_sync_changelog_not_found(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "tmp/sync-main/r4.1", + "pr-to-main/r4.1", "r4.1" ) @@ -147,7 +147,7 @@ def test_sync_changelog_update_fails(self, syncer, mock_github_client): result = syncer._sync_changelog( "release-snapshot/r4.1-abc123", - "tmp/sync-main/r4.1", + "pr-to-main/r4.1", "r4.1" ) @@ -157,7 +157,7 @@ def test_sync_changelog_invalid_release_tag(self, syncer, mock_github_client): """Invalid release tag format - returns False.""" result = syncer._sync_changelog( "release-snapshot/invalid-abc123", - "tmp/sync-main/invalid", + "pr-to-main/invalid", "invalid" ) @@ -172,7 +172,7 @@ def test_create_pr_success(self, syncer, mock_github_client): """Successfully creates PR.""" mock_github_client._run_gh.return_value = "https://github.com/test-org/test-repo/pull/42" - result = syncer._create_pr("r4.1", "tmp/sync-main/r4.1") + result = syncer._create_pr("r4.1", "pr-to-main/r4.1") assert result is not None assert result["number"] == 42 @@ -183,7 +183,7 @@ def test_create_pr_already_exists(self, syncer, mock_github_client): mock_github_client._run_gh.side_effect = GitHubClientError("PR already exists") mock_github_client.find_pr_for_branch.return_value = 99 - result = syncer._create_pr("r4.1", "tmp/sync-main/r4.1") + result = syncer._create_pr("r4.1", "pr-to-main/r4.1") assert result is not None assert result["number"] == 99