Skip to content
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

Add option for --first-parent in changelog #23

Merged
merged 2 commits into from
Feb 5, 2015

Conversation

onionjake
Copy link

This adds an option to select whether or not --first-parent is
passed to "git log" when determining the changelog. The default
value is to include it.

This adds an option to select whether or not --first-parent is
passed to "git log" when determining the changelog.  The default
value is to include it.
@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@rsandell
Copy link
Member

rsandell commented Jan 9, 2015

Configured jobs before this change will default to not have --first-parent. Because when the job is read from disk the first-parent field is missing and so will be set to the boolean default which is false.

@onionjake
Copy link
Author

@rsandell I can reverse the logic so if it is checked --first-parent is excluded. That should keep the same behavior for already configured jobs.

@rsandell
Copy link
Member

Reverse logic is usually hard to grok. But in this case it might be OK.

You could also make the field into a Boolean reference and add a readResolve that would check if it is null and in that case set it to true, so old configs get converted, or check for null in the get and return true.

Renaming this option and reversing the logic effectively allows
backwards compatibility with the existing plugin behavior.
@onionjake
Copy link
Author

I've renamed the parameter and reversed the logic. Hopefully it isn't too confusing.

rsandell added a commit that referenced this pull request Feb 5, 2015
Add option for --first-parent in changelog
@rsandell rsandell merged commit 620bee5 into jenkinsci:master Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants