Skip to content

ci: use PR number from github context for coverage report#6

Open
knecasov wants to merge 1 commit into
mainfrom
fix-coverage-pr-lookup
Open

ci: use PR number from github context for coverage report#6
knecasov wants to merge 1 commit into
mainfrom
fix-coverage-pr-lookup

Conversation

@knecasov

Copy link
Copy Markdown
Owner

What

Replace the API-based PR lookup with github.event.pull_request.number for posting the coverage report comment to a PR.

Why

The previous approach used github.repository_owner to find the PR, which does not work for PRs from forks where the branch owner differs from the upstream repository owner.

@github-actions

Copy link
Copy Markdown

go-test-coverage report

Total test coverage: 63.8% (1402/2197)

No coverage changes in any files compared to the base.

@knecasov
knecasov force-pushed the fix-coverage-pr-lookup branch 2 times, most recently from 4554fff to cf20c51 Compare March 10, 2026 18:45
- split PR comment into separate workflow_run-triggered workflow
  so the token has write permissions for fork PRs
- pass PR number and coverage report via artifact between workflows

Signed-off-by: Klara Necasova <knecasov@redhat.com>
@knecasov
knecasov force-pushed the fix-coverage-pr-lookup branch from cf20c51 to e05ab03 Compare March 11, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant