jenkinsci / jenkinsci/description-setter-plugin
[JENKINS-6771] Description setter does not handle the case when nothing matches the regex
- 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
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
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