actions / actions/toolkit

Problem matchers which match an invalid file cause annotations to come up as being in the file .github

Open
#473 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug external
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
If a problem matcher doesn't match a valid file (e.g. the regex captures "test.txt ", with a space at the end, the annotation comes up as being in the file .github rather than the matched file.

To Reproduce
Create a problem matcher which matches at least an invalid filename, or possibly a file not in the repo.

Expected behavior
Either not annotating .github, or annotating the match for a filename that doesn't exist, or perhaps clearest some sort of error somewhere (perhaps in the action log), that the matched filename doesn't exist.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the report. Reproduce the problem with a matcher whose filename capture has a trailing space or names a missing file, then trace how the toolkit turns that match into an annotation. Done means invalid paths no longer produce a misleading .github annotation, with behavior covered by an appropriate test.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.