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 maven support for git-based copyright headers #626

Merged
merged 8 commits into from
Jun 30, 2020

Conversation

nedtwigg
Copy link
Member

Please make sure that your PR allows edits from maintainers. Sometimes its faster for us to just fix something than it is to describe how to fix it.

Allow edits from maintainers

After creating the PR, please add a commit that adds a bullet-point under the -SNAPSHOT section of CHANGES.md, plugin-gradle/CHANGES.md, and plugin-maven/CHANGES.md which includes:

  • a summary of the change
  • either
    • a link to the issue you are resolving (for small changes)
    • a link to the PR you just created (for big changes likely to have discussion)

If your change only affects a build plugin, and not the lib, then you only need to update the CHANGES.md for that plugin.

If your change affects lib in an end-user-visible way (fixing a bug, updating a version) then you need to update CHANGES.md for both the lib and the build plugins. Users of a build plugin shouldn't have to refer to lib to see changes that affect them.

This makes it easier for the maintainers to quickly release your changes :)

@nedtwigg nedtwigg requested a review from lutovich June 29, 2020 18:25
@nedtwigg
Copy link
Member Author

This is the last PR in this train, I'll cut releases of everything once this gets merged.

plugin-maven/CHANGES.md Outdated Show resolved Hide resolved
@@ -120,6 +121,9 @@
@Parameter(property = "spotlessFiles")
private String filePatterns;

@Parameter(property = LicenseHeaderStep.spotlessSetLicenseHeaderYearsFromGitHistory)
private String setLicenseHeaderYearsFromGitHistory;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this field/parameter be boolean instead of string?
I think this could simplify type signatures (boolean instead of Optional<String>) and the check in LicenseHeader

Copy link
Member Author

Choose a reason for hiding this comment

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

I think there's a decent chance that we'll allow values besides "true" in the future. For example, you might want to exclude certain commits, say formatting commits, from the git history that you care about, and this is the pipe that we'll put that through.

@nedtwigg nedtwigg merged commit ba3c126 into main Jun 30, 2020
@nedtwigg nedtwigg deleted the feat/maven-licenseyear-githistory branch June 30, 2020 03:50
@nedtwigg
Copy link
Member Author

nedtwigg commented Jul 2, 2020

Published in maven 2.0.0

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.

2 participants