Repository navigation
ABI check comment for pull requests from forks too - #240
Merged
Merged
Conversation
testpr.yaml's abi-comment job was skipped for pull requests from forks, whose runs only get a read-only token (e.g. #235). Post the comment from a separate workflow_run workflow instead, which runs from main with a write token, for all pull requests. It never checks out or runs pull-request code: the abi-check-*.md artifacts and the branch name come from the pull request's run, so they are only used as the comment text, and the pull request is looked up from the API (open, head at the built commit) rather than taken from the artifacts. A cancelled run (a newer push) posts nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Pull requests from forks never got the ABI check comment:
testpr.yaml'sabi-commentjob is skipped for them because their runs only get a read-only token (e.g. #235, fromnobleo).This moves the comment to a separate
workflow_runworkflow (.github/workflows/abi-comment.yaml), triggered when Build completes. It runs frommainwith a write token and posts or updates the same comment, for all pull requests, forks included. The old job is removed fromtestpr.yaml.Safety. A fork's pull request can change
testpr.yamlin its own run, so that run's artifacts are untrusted. The new workflow:abi-check-*.mdartifacts only as the comment text (capped below GitHub's comment limit);env, not inline expressions.tools/maintenance.py'srebuild-dependentsreads this comment, but for a fork it only prints the suggested entries back (the bot can't push to forks), so it trusts nothing new.Note: a
workflow_runworkflow only takes effect from the default branch, so this can only be seen working after merge. The next push to a fork PR such as #235 should then get the comment.Labelled
build:none: it changes no packages.🤖 Generated with Claude Code