fix: restore CHANGELOG.md when reusing release branch - #50
Merged
Conversation
- also restore CHANGELOG.md alongside VERSION in the branch-exists path - prevents 'local changes would be overwritten by checkout' error Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary - restore `CHANGELOG.md` alongside `VERSION` in the `branch_exists` path of the Release workflow - prevents the `git switch` from failing with "local changes would be overwritten by checkout" ## Root cause The "Update CHANGELOG" step modifies `CHANGELOG.md` before the "Create or reuse release branch" step. When a release branch already existed, only `VERSION` was restored — leaving `CHANGELOG.md` dirty — causing `git switch -C` to abort.
patrickschaper
enabled auto-merge
May 20, 2026 07:25
- merges to main only via development or release/* branches - releases triggered via the Release GitHub Actions workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary - merges to `main` only via `development` or `release/*` branches - releases triggered via the Release GitHub Actions workflow
- requires PRs to main to come from development or release/v* branches Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary - commits the `branch-policy.yml` workflow that was only present locally - enforces that PRs to `main` must come from `development` or `release/v*` - fixes the perpetually-pending "Check source branch" status check on PR #50
Comment on lines
+10
to
+27
| name: Check source branch | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Require development or release branch | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| source="${{ github.head_ref }}" | ||
| echo "Source branch: ${source}" | ||
|
|
||
| if [[ "${source}" == "development" || "${source}" == release/v* ]]; then | ||
| echo "Branch '${source}' is allowed to merge into main." | ||
| else | ||
| echo "Branch '${source}' is not allowed to merge into main." >&2 | ||
| echo "Only 'development' and 'release/v*' branches may open PRs targeting main." >&2 | ||
| exit 1 | ||
| fi |
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.
Summary
CHANGELOG.mdalongsideVERSIONin thebranch_existspath of the Release workflowgit switchfrom failing with "local changes would be overwritten by checkout"Merges development → main.