-
-
Notifications
You must be signed in to change notification settings - Fork 0
version bump test fix #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,10 @@ jobs: | |||||||||||
| pull-requests: write | ||||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||
| with: | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: Bump Version | ||||||||||||
| id: bump-version | ||||||||||||
| uses: conjikidow/bump-version@v2.0.0 | ||||||||||||
|
|
@@ -23,6 +27,12 @@ jobs: | |||||||||||
| label-patch: 'Patch' | ||||||||||||
| create-release: 'false' | ||||||||||||
|
|
||||||||||||
| - name: Auto-merge pull request | ||||||||||||
| if: steps.bump-version.outputs.version-bumped == 'true' | ||||||||||||
| run: gh pr merge --squash --auto "${{ github.event.pull_request.number }}" | ||||||||||||
| env: | ||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+30
to
+35
|
||||||||||||
| - name: Auto-merge pull request | |
| if: steps.bump-version.outputs.version-bumped == 'true' | |
| run: gh pr merge --squash --auto "${{ github.event.pull_request.number }}" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This job uses secrets.GITHUB_TOKEN to push/merge. For PRs coming from forks (the repo docs encourage forking), pull_request workflows run with a read-only token and no secrets, so the bump and merge steps will not be able to write back to the repo. Consider triggering this workflow on push to master (post-merge) or using a workflow_run/deployment-style workflow with appropriate permissions, rather than relying on pull_request context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On
pull_requestevents,actions/checkoutdefaults to checking out the PR ref atgithub.sha(often a detached HEAD). If the version bump is intended to land on the base branch (master) after merge, this checkout should explicitly target the base branch/ref (or this workflow should be triggered bypushtomaster) so the bump action commits to the correct branch.