Repository navigation
ci: let the bundle report app token write PR comments - #2637
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Pre-merge checks:
|
This branch was successfully deployed
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.
Since #2618 (6 Nov), PRs haven't gotten bundle-size comments. That PR limited the bundle report app token to
issues: writeandpull-requests: read. When thebundle-size-commentjob tries to post, it gets a 403. Here is #2635 in run 43046127180:Every comment job after #2618 that tried to post failed this way (#2608, #2609, #2611, #2619, #2626, #2631, #2632, #2634, #2635). The last comment from
nuxt-com-bundle-report[bot]is on #2613, at 15:11 UTC on 6 Nov. The green runs since then posted nothing. They log "Skipping: no open pull request has the commit of these runs as its head".What changed
bundle-size-comment.yml: the app token now asks forpull-requests: writeinstead ofread. Commenting on a PR through the issues comments endpoint needs this permission. Before ci: report bundle size with the nuxt-bundle-analyzer CLI #2618 the token got every permission the app's installation has, and the samecreateComment/updateCommentcalls worked.Evidence
bundle-size-commentruns onworkflow_runfrommain, so this PR can't test itself. Once it is merged, rerun the latestbundle-sizerun of an open PR (for example chore: upgrade comark-content to v0.6.0 #2635). The comment job should then post its comment.pull-requests: write, but nobody has checked the app settings. If minting fails after merge with a permissions error, addpull-requests: writeto the app installation.ELI5
The bot that posts bundle-size comments was given a key that opens issues but not pull requests, so GitHub stopped it at the door. This gives it the right key.