actions / actions/toolkit

Problem matchers: Support finding multiple matches in a single line

Open
#481 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement problem matcher
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to write a custom problem matcher for a tool that outputs all its results as a JSON object on a single line.
Today, Actions only supports finding one result per line. It would be great to be able to find multiple results per line, similar to the /g option for regexs.

It seems like the runner is using Regex.Match today which only yields one result max: https://github.com/actions/runner/blob/6c70d53eead402ba5d53676d6ed649a04e219c9b/src/Runner.Worker/IssueMatcher.cs#L68

I would suggest to look into maybe using Regex.Matches or something similar that enables multiple matches per line.

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

Start in the linked src/Runner.Worker/IssueMatcher.cs at the current Regex.Match call. Review how problem matcher results are extracted for one line, then verify that a single line can produce multiple matches and that each result is reported correctly. Done means multiple JSON results on one line are recognized by the problem matcher.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.