Skip to content

Add support for environment variables in check name (#318)#517

Open
michbu1 wants to merge 1 commit intojenkinsci:masterfrom
syncron-oss:issue318
Open

Add support for environment variables in check name (#318)#517
michbu1 wants to merge 1 commit intojenkinsci:masterfrom
syncron-oss:issue318

Conversation

@michbu1
Copy link

@michbu1 michbu1 commented Mar 4, 2026

Fixes #318

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@michbu1 michbu1 requested a review from a team as a code owner March 4, 2026 21:54
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok

@timja timja added the enhancement New feature or request label Mar 4, 2026
@timja
Copy link
Member

timja commented Mar 4, 2026

@michbu1 have you tested this in an actual Jenkins instance or just via integration tests? - I note that you've left the testing done section of the template empty, this must be completed.

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.63%. Comparing base (803edab) to head (71d41e3).
⚠️ Report is 110 commits behind head on master.

Files with missing lines Patch % Lines
...ins/plugins/checks/github/GitHubChecksContext.java 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #517      +/-   ##
============================================
- Coverage     71.80%   71.63%   -0.17%     
- Complexity      162      165       +3     
============================================
  Files            16       16              
  Lines           532      543      +11     
  Branches         51       53       +2     
============================================
+ Hits            382      389       +7     
- Misses          124      126       +2     
- Partials         26       28       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KalleOlaviNiemitalo
Copy link

Can this be implemented in checks-api-plugin instead? So that the expansion of environment variables does not depend on whether GitHub is used.

In the withChecks step, I feel the expansion should be suppressed because Groovy string interpolation can be used instead and double expansion might lead to some sort of unwanted injection.

@michbu1
Copy link
Author

michbu1 commented Mar 5, 2026

@michbu1 have you tested this in an actual Jenkins instance or just via integration tests? - I note that you've left the testing done section of the template empty, this must be completed.

We have tested this code on Jenkins 2.452.4, and plugin version 589.v845136f916cd.
Now I have taken git patch and apply it to newer version of plugin without major problems.

@michbu1
Copy link
Author

michbu1 commented Mar 5, 2026

Can this be implemented in checks-api-plugin instead? So that the expansion of environment variables does not depend on whether GitHub is used.

In the withChecks step, I feel the expansion should be suppressed because Groovy string interpolation can be used instead and double expansion might lead to some sort of unwanted injection.

Hmm, thank you. I will look at checks-api-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using environment variable for status checks name

3 participants