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

Generating release changelog from non-master branch commit history #116

Open
durera opened this issue Dec 3, 2017 · 10 comments
Open

Generating release changelog from non-master branch commit history #116

durera opened this issue Dec 3, 2017 · 10 comments

Comments

@durera
Copy link
Contributor

durera commented Dec 3, 2017

We have a system where the latest major release is always from master branch, but we also maintain old major releases in branches such v1.x, v2.x etc, etc. If I run gren for a release from master everything works as I'd expect. The release notes for the latest major release are generated and include all the commits from master branch, but if I want to make a new oldversion.x.y release I can't work out how to make gren use the commits from the appropriate branch rather than master. I couldn't see anything in the docs: https://github-tools.github.io/github-release-notes/options.html

Is this possible and I've just overlooked the option I need?

Invoking gren like this FWIW:

$GREN \
  --username=$USER \
  --repo=$REPO \
  --token=$GITHUB_TOKEN \
  --data-source=commits \
  --action=release \
  --tags=$VERSION \
  --include-messages=commits
@alexcanessa
Copy link
Member

Hello @durera, there aren't any options to choose a branch right now. I think is a very good idea tho!

Definitely going into the backlog 🎉

@alexcanessa alexcanessa added this to the Next Version milestone Dec 4, 2017
@durera
Copy link
Contributor Author

durera commented Dec 4, 2017

Great, I’ll have a look and try wing a PR your way .. I suspect it’s relatively simply change involving adding the sha=branchname param in the method in gren that looks up the commits and defaulting to master when not set.

@alexcanessa
Copy link
Member

@durera indeed, all the options coming from the command are in /lib/_option.js (same source utilised for documentation and application).

See how it goes :)

@alexcanessa alexcanessa modified the milestones: Release 0.14.0, Next Version Dec 8, 2017
@kstolte
Copy link
Contributor

kstolte commented Jul 2, 2018

@durera did you make any progress on this by chance?

@alexcanessa alexcanessa removed this from the Next Version milestone Sep 25, 2018
@franzwilhelm
Copy link

@durera any updates on this?

@cjbarth
Copy link
Contributor

cjbarth commented May 20, 2021

I'm running in to this problem, but a slightly different flavor. I have a branch for the 2.x series of releases and the current 3.x releases are on master. The changelog shows PRs that landed on on master as being part of the 2.x series, which means they aren't showing up on the 3.x series. Given this includes some breaking changes being attributed to the wrong release, this is a real problem.

@cjbarth
Copy link
Contributor

cjbarth commented May 20, 2021

It seems that the correct solution would be to return the entire set of PRs (commits, whatever) that follows the same base.ref. This way you'll get all the commits in the same branch. Thoughts on this approach @alexcanessa ?

@cjbarth
Copy link
Contributor

cjbarth commented May 21, 2021

Further testing and experimentation indicates that the only way to reliably do this would be to take the two tags in the range object and make another API call /repos/{owner}/{repo}/compare/{basehead}. Then, you can either use the list of commits directly from that call, or match the sha from the commits to the ones returned in the call to getMergedPullRequests in order to correctly figure out what is actually in each release.

I'd love to hear from some maintainers if such an approach will land in this project.

@RobAustin
Copy link

I think this project may do what you are looking for https://github.com/OpenHFT/Chronicle-Release-Notes

@cjbarth
Copy link
Contributor

cjbarth commented May 31, 2021

Thank you for the suggestion, however, that requires Java, so isn't really an option. I've actually got everything working and am just waiting on some PRs to be approved and landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants