Problem matchers don't work with event `issue_comment` (and other events?)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Annotations for errors/warnings are created by a problem matcher (in the log with colors + badge), but the PR doesn't show them.
Expected behavior
Pull request shows all annotations regardless from which event type workflow was triggered.
Additional context
Looks like closed bug from 2019: https://github.com/actions/toolkit/issues/133
Clarification from there:
The checks API requires the head_sha, the sha provided by
github.context.shafor pull_request builds is a merge sha, so these do not end up aligning.
For now, you can use access the head_sha for pull request builds viagithub.context.payload.pull_request.head.sha. I've confirmed that I can see the annotations for those builds.
So, how I can use issue_comment / pull_request with problem matchers?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the problem matcher behavior described here and the linked actions/toolkit issue 133, then compare annotation handling for issue_comment and pull_request events. Verify how github.context.sha differs from pull_request.head.sha and define done as annotations appearing on the pull request for the supported event types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100