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

Credit contributors in ported contributions #52

Merged

Conversation

scottfrederick
Copy link
Contributor

Support configuration of labels that indicate an issue is a forward-port
or back-port of another issue, and follow the chain back to the original
issue for attribution of a contributor.

Support configuration of labels that indicate an issue is a forward-port
or back-port of another issue, and follow the chain back to the original
issue for attribution of a contributor.
String issueNumber = matcher.group(1);
Issue referencedIssue = this.service.getIssue(issueNumber, this.repository);
if (referencedIssue != null) {
return getPortedReferenceIssue(referencedIssue);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@scottfrederick I don't think this would work for an issue that is a forward-port of a forward-port, would it? For example, if the original issue is in 2.2.x and we're generating release notes for 2.4.x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The recursion will follow a chain of issues that have the same label (e.g. status: forward-port). When the first issue in the chain without the label is encountered, it will be returned up the recursion stack. This does depend on the body regular expression being general enough to capture every version (e.g. Forward port of issue #(\d+).*) The unit test covers this case, but after another look it might be better to split out a separate test case that makes it more clear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh yes, you're right. I misread what the loop does.

@scottfrederick scottfrederick added this to the 0.0.5 milestone Dec 9, 2020
@scottfrederick scottfrederick merged commit de36bf5 into spring-io:master Dec 9, 2020
@scottfrederick scottfrederick deleted the ported-contributors branch December 9, 2020 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants