fix(ci): use workflow_run for fork-safe PR coverage comments#33
Merged
apuchmarcos merged 1 commit intoAmadeusITGroup:mainfrom Mar 2, 2026
Merged
Conversation
1atsavignac
approved these changes
Mar 2, 2026
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
Fix CI failure (
GraphQL: Resource not accessible by integration) when posting coverage comments on PRs from forks.The
GITHUB_TOKENfor fork-based PRs is read-only, sogh pr commentfails. This PR moves coverage comment posting to a separateworkflow_run-triggered workflow, which runs frommainwith the base repo's token — making it fork-safe.Changes:
ci-cd.yml: Removedpull-requests: writepermission and the directgh pr commentstep frombuild-and-test. Added steps to save coverage data (summary, total, PR number) as an artifact.coverage-comment.yml(new): Triggered byworkflow_runon CI/CD completion. Downloads coverage artifact, validates PR number and coverage total, and posts the comment.Type of change
How to test
main(required —workflow_runworkflows only run from the default branch).Checklist
make test(or equivalent) and it passed.make lint(if applicable) and it passed.Notes for reviewers
coverage-comment.ymlmust be onmainbefore it will trigger. The first PR after merging this will be the first one that gets coverage comments.coverage-reportartifact has a 1-day retention — it's ephemeral and only needed for the comment workflow.