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
Improve Features #3
Conversation
storing state in job config.xml is bad as job-dsl will override it each time and state get lost
<f:textbox /> | ||
</f:entry> | ||
<f:entry title="Reopen issue" field="issueReopen"> | ||
<f:checkbox default="true"/> |
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.
I'll probably default this to false
- Reopening a previous issue isn't very useful in a lot of cases, particularly if the existing issue is very old. I guess a setting like "Reopen the issue if it's less than X days old, otherwise create a new one" would be helpful.
String title = StringUtils.defaultIfBlank(notifier.getCustomTitle(), descriptor.getIssueTitle()); | ||
String body = StringUtils.defaultIfBlank(notifier.getCustomBody(), descriptor.getIssueBody()); | ||
String label = StringUtils.defaultIfBlank(notifier.getCustomLabel(), descriptor.getIssueLabel()); | ||
final GitHubIssueNotifier.DescriptorImpl globalConfig = jobConfig.getDescriptor(); |
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.
Nice, I didn't know about final
. I usually write JavaScript and some C#, so Java is pretty foreign to me 😛
Nice! Thank you for your contribution. Do you think it'd be straightforward to write unit tests for this plugin? I haven't written Java in a long time (my experience is mainly with C# and JavaScript) so I'm not sure what unit testing in Java is like these days. |
I'll try to release a new version tomorrow 😄 |
Published as 1.2 (Jenkins' servers take a few hours to update, but you should see the release soon). Thanks for your contribution! I'll mention you in the changelog :) |
This pull request adds the following features:
In order to allow the genius job-dsl configure this plugin, we need to store any state produced by the plugin somewhere outside the
config.xml
as this file will be regenerated completely. With this pull request, the issue number is persisted in the run action.In order to allow a dedicated repo to collect issues for example in a multi scm project or to collect the issues for all ci jobs (we have around 3k jobs) in separate team repos, the repo url is now configurable. If not set, the default from the github plugin is chosen.
When this pull request gets applied, i will add a pull request to the job-dsl plugin with the corresponding dsl elements.