jenkinsci / jenkinsci/description-setter-plugin

[JENKINS-6771] Description setter does not handle the case when nothing matches the regex

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
component:description-setter-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
17
Forks
40
Avg merge
1d 4h
Merged PRs (30d)
1

Description

In the description setter plugin configuration for my job, I have specified a regex to match, and a description of "\1" (which means output the first match group).

If no lines in the output match the regex, the description is set to the literal string "\1", which of course is just confusing.

It would be useful if I coudl specify the description to set in the event that no lines matched.

---
Originally reported by mwebber, imported from: Description setter does not handle the case when nothing matches the regex


  • assignee: huybrechts
  • status: Open
  • priority: Major
  • component(s): description-setter-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 0
  • imported: 20251216-182730

Raw content of original issue

In the description setter plugin configuration for my job, I have specified a regex to match, and a description of "\1" (which means output the first match group).

If no lines in the output match the regex, the description is set to the literal string "\1", which of course is just confusing.

It would be useful if I coudl specify the description to set in the event that no lines matched.

Contributor guide

Open the contributing guide

Research direction

Start by locating the description-setter plugin code that applies the configured regex and replacement description, then inspect any existing tests for unmatched output. Define the fallback behavior for cases where no lines match, and consider how it should be configured; done means unmatched output no longer becomes the literal "\\1" and the behavior is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.