Skip to content

ABI check comment for pull requests from forks too - #240

Merged
Tobias-Fischer merged 1 commit into
mainfrom
abi-comment-workflow-run
Nov 20, 2026
Merged

Tobias-Fischer merged 1 commit into
mainfrom
abi-comment-workflow-run

Conversation

@Tobias-Fischer

Copy link
Copy Markdown
Collaborator

Pull requests from forks never got the ABI check comment: testpr.yaml's abi-comment job is skipped for them because their runs only get a read-only token (e.g. #235, from nobleo).

This moves the comment to a separate workflow_run workflow (.github/workflows/abi-comment.yaml), triggered when Build completes. It runs from main with a write token and posts or updates the same comment, for all pull requests, forks included. The old job is removed from testpr.yaml.

Safety. A fork's pull request can change testpr.yaml in its own run, so that run's artifacts are untrusted. The new workflow:

  • never checks out or runs pull-request code;
  • uses the abi-check-*.md artifacts only as the comment text (capped below GitHub's comment limit);
  • looks the pull request up from the API (an open PR whose head is the built commit) instead of taking it from the artifacts;
  • passes the run's branch and owner to the shell via env, not inline expressions.

tools/maintenance.py's rebuild-dependents reads 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_run workflow 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

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>
@Tobias-Fischer Tobias-Fischer added the build:none PR build: build no packages, only run the checks (tooling, CI or docs changes) label Nov 20, 2026
@Tobias-Fischer
Tobias-Fischer merged commit 24c0cd5 into main Nov 20, 2026
7 checks passed
@Tobias-Fischer
Tobias-Fischer deleted the abi-comment-workflow-run branch November 20, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:none PR build: build no packages, only run the checks (tooling, CI or docs changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant