Repository navigation
fix(ci): grant the bump workflow the write permissions it now needs - #45
Merged
Merged
Conversation
Dropping the (nonexistent) PAT left GITHUB_TOKEN read-only, since the repo default is read and the workflow declares no permissions block. The next labelled merge would 403 when opening the bump PR.
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
Follow-up to #44. That PR dropped
secrets.POSTHOG_BOT_PAT(a secret that does not exist on this repo, so both the checkout and the PR step were running with an empty token) and switched toGITHUB_TOKEN, which is required forsign-commitsto work — signing only happens with a bot-generated token, never a PAT.What it missed: this repo's default workflow permission is
read, and the workflow declares nopermissions:block. With the PAT gone,GITHUB_TOKENhas no write access, so the nextbump patch|minor|majormerge would fail with a 403 when create-pull-request tries to push the branch and open the PR.Changes
permissions:block grantingcontents: writeandpull-requests: writeTesting
Not run end to end — the workflow only fires when a PR carrying a
bump *label is merged, and it has only ever been skipped in recent history. Confirmed viarepos/PostHog/drf-exceptions-hog/actions/permissions/workflowthatdefault_workflow_permissionsisread, and that nopermissions:key exists anywhere in the workflow.Two pre-existing problems this does not fix
Flagging rather than fixing, since both are out of scope and predate #44:
ubuntu-20.04, a runner GitHub has retired, so it cannot start at all. Whoever owns this repo should bump it.GITHUB_TOKENdoes not triggeron: pull_requestworkflows, soCI.ymlwill not run on the bump PR.release.ymlstill fires, because a human performs the merge. A GitHub App token would both sign and trigger CI, if that matters enough to set one up.