Skip to content

build(release): separate sync changelog into standalone workflow and CLI tool - #4067

Merged
rickeylev merged 5 commits into
bazel-contrib:mainfrom
rickeylev:separate_sync_pr_workflow
Aug 17, 2026
Merged

build(release): separate sync changelog into standalone workflow and CLI tool#4067
rickeylev merged 5 commits into
bazel-contrib:mainfrom
rickeylev:separate_sync_pr_workflow

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Backport processing previously combined applying backports to a
release branch with synchronizing the changelog back to main. This
tight coupling prevented changelog synchronization from being
triggered, dispatched, or retried independently of the backport
process.

Separate changelog synchronization into a dedicated sync-changelog
CLI command and standalone GitHub Actions workflows. Update backport
processing to record changelog sync tasks rather than executing them
directly. Add event parsing helpers to inspect GITHUB_EVENT_PATH in
workflows, integrate GitHub Actions workflow command annotations
into release logging, and expand documentation and test coverage.

…CLI tool

Currently, when a backport is made to a release branch by the release tool and workflow, the same job and logic tries to create the corresponding sync PR to main. This couples backport processing with changelog synchronization, preventing the changelog sync from being triggered or retried independently.

Separate changelog synchronization into a dedicated `release sync-changelog` CLI command and a standalone GitHub Actions workflow that can run automatically or be manually dispatched. Update the backport processing logic and workflow to record the sync changelog task without executing it directly.
…t input handling

Refactor sync changelog processing into dedicated workflows and streamline event input resolution.

Why:
- Isolate sync changelog and completion jobs into separate reusable workflows for clarity and maintainability.
- Avoid passing manual CLI arguments in GitHub Actions by reading event context directly from GITHUB_EVENT_PATH.
- Improve logging visibility with workflow command annotations and clean issue comments.

How:
- Extract complete sync changelog logic into release_sync_changelog_complete.yaml workflow.
- Update release_sync_changelog.yaml and release_sync_changelog_complete.yaml to run without CLI flag passing.
- Add GitHubEventDict and GITHUB_EVENT_PATH parser helpers to gh.py.
- Configure GitHubActionsLogHandler in release.py for GHA notices, warnings, and errors.
- Simplify tracking issue comment messages and link to workflow runs.
…er and add gha test fixture

Refactor PR closed event handling to use a dedicated Python parsing script and introduce a reusable GitHub Actions test fixture.

Why:
- Align on_pr_closed workflow structure with on_comment.yaml using a separate parser step that reads GITHUB_EVENT_PATH.
- Remove redundant sync-changelog trigger on PR close since sync PRs are created during backport handling.
- Simplify GHA environment setup in release tool unit tests with a shared fixture.

How:
- Add .github/workflows/on_pr_closed.py and update on_pr_closed.yaml to dispatch to process_backports or release_sync_changelog_complete.yaml.
- Remove CLI --issue argument from release_sync_changelog.yaml and rename step to "Create Sync PR to Main".
- Introduce gha test fixture in release_test_helper.py and add on_pr_closed_test.py.
Add repo attribute annotation on GitHubInterface to resolve pyrefly type checking in release_lib.

Why:
- Pyrefly strict type checking in CI caught missing repo attribute on GitHubInterface in sync_changelog.py.

How:
- Annotate repo: str on GitHubInterface in gh.py.
- Provide default empty string fallback for repo argument in _get_workflow_action_url_text.
@rickeylev
rickeylev marked this pull request as ready for review August 17, 2026 07:41
@rickeylev
rickeylev requested a review from aignas as a code owner August 17, 2026 07:41
@rickeylev
rickeylev merged commit b76ffcd into bazel-contrib:main Aug 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant