-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to add a custom message #78
Conversation
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Thanks for submitting this pull request. I don't actively develop this plugin but I do maintain pull requests and releases. I'll leave this PR open a little bit so more eyeballs can look at it. If all turns out well then I'll make it a candidate to merge. |
From my quick review and understanding of Java the change seems okay. I'll wait for others to review. |
For passing variables around : why the need for both |
logger.log(SEVERE, e.getMessage(), e); | ||
} | ||
message.append("\n"); | ||
message.append(replaceMacro(customMessage, new VariableResolver.ByMap<String>(buildVariables))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using EnvVars expand()
? https://github.com/jenkinsci/jenkins/blob/76adbf922369fae214cf86445d422a424f7d309a/core/src/main/java/hudson/EnvVars.java#L382
If I understand it correctly, would also allow usage of Environment Variables?
Thanks for the suggestion - made the change to use the expand method of EnvVars. With regards to using includeCustomMessage and customMessage, this was done so that the custom message can be disabled/enabled without needing to delete it. So it's more a usability decision, but yes, it does mean that an additional variable needs to be passed around. |
Since there was at least one reviewer other than myself I'm moving this into a |
I was not able/willing to resolve the conflict adequately. Please rebase or merge in the latest master and resolve the conflicts. |
I've changed my mind. I'll open it up for code review a little longer. Also, please update and resolve the merge conflicts. |
Code style looks good. I'm going to do some more testing locally and if all looks good then I'll merge. |
Related to issue #49.
Option to include a custom message in the advanced section of the config. Resolves build variables. We use this mostly to include maven variables as shown in the screen shots.
Config:
Outcome: