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
[JENKINS-4162] Optionally report the most recent commit as the changelog of a new build #1565
base: master
Are you sure you want to change the base?
Conversation
Consider updating the references to "changelog" in documentation to "changeset" to match the keyword used in Jenkinsfiles. |
/* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2017 CloudBees, Inc. |
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.
Copyright date should be this year.
Also, check to see if copyright dates may need to be updated in other files modified.
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.
Copyright should not be assigned to CloudBees usually. Author usually retains copyright.
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 have removed the CloudBees copyright documentation, would an author descriptor be adequate for this file?
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.
Either is fine. If you want to declare copyright explicitly, that is fine. If you don't list it explicitly, the creation of the file makes it copyright by you implicitly.
Thanks for your contribution
// this is the first time we are building this branch, so there's no base line | ||
// to compare against. | ||
// if we force the changelog, it'll contain all the changes in the repo, which | ||
// is not what we want. |
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 think this existing comment should be rewritten now that its within the context of the else case of the new option. But, perhaps just removing it would be best.
src/main/java/jenkins/plugins/git/traits/FirstBuildChangelogTrait.java
Outdated
Show resolved
Hide resolved
Co-authored-by: UltimateGeek <10050028+UltimateGeek@users.noreply.github.com>
Removed improper CloudBees copyright documentation, updated @param for the constructor
I have seen this issue in other pull requests (#1556 (comment)) I was wondering if anyone had other insight into this issue of not passing the windows tests? |
Use line termination that is consistent with the other files in the repository. Use import ordering as defined by spotless.
src/main/java/hudson/plugins/git/extensions/impl/FirstBuildChangelog.java
Outdated
Show resolved
Hide resolved
src/main/resources/hudson/plugins/git/extensions/impl/FirstBuildChangelog/config.groovy
Outdated
Show resolved
Hide resolved
src/main/java/hudson/plugins/git/extensions/impl/FirstBuildChangelog.java
Show resolved
Hide resolved
Needs documentation added to the README that describes how this is used in a Pipeline and how it is displayed to the user when they use the Pipeline snippet syntax generator inside their Jenkins controller. I created a Pipeline with the Pipeline snippet syntax generator like this:
|
Hi @MarkEWaite, do you think the open items in the checklist in this PR can be checked off, and this merged? |
The new extension reports the most recent commit as the changelog. It does not report the changes from a base branch, because there is no reliable method to identify the base branch from command line git. Also adjusts capitalization to be consistent with other parts of the documentation.
Thanks for asking. I needed to make several changes to prepare for a final code review and interactive testing.
Interactive tests are needed to confirm there are no surprises that automation has missed. |
Thanks @MarkEWaite . I see the checklist item for the online help updates is still outstanding. Are there any changes with it you'd like @rhit-gawronja or @rhit-inskeeda to make? |
I've completed the changes in the online help and in the documentation. I don't see any further changes that are needed. |
JENKINS-4162 - Implementing behavoir to handle JENKINS-4162
Looking to fix the behavior that is associated with push changes onto a brand new created branch. With these changes when the behavior is selected Jenkins will now present a changelog on the creation of a new branch. The changelog for the first build will be the most recent commit on the branch.
Other issue reports that are related and highlight the complexity of the general case include:
Git doesn't have the concept of a base branch. Many SCM providers (GitHub, Bitbucket, GitLab, Gitea, etc.) have a concept of a target branch, but the git plugin intentionally limits itself to the capabilities provided by command line git. Other plugins (like the GitHub branch source, Bitbucket branch source, GitLab branch source, and Gitea plugins) provide more capabilities and implement those capabilities using the specific APIs of the SCM provider.
Checklist
Types of changes
What types of changes does your code introduce?