Getting recent changes for generating release notes on github enterprise

20 Views Asked by At

I'm on a older github enterprise server (3.2). Developer usually commit to develop, but some hot fixes can happen on master as well.

Each time when we deploy, we generate a github release. Up until today, we used the "recent changes" feature from Jenkins (which builds from master) in order to generate a changelog, however jenkins is now replaced with something else which is why I want to generate the changelog using github now.

The problem is I don't really know how to generate a changelog. I thought of taking the commit of the release and simply collect everything that is older (from master), but that doesn't work as commits on develop could have been pushed way before the actual release but are only merged to master later.

Essentially I'd like to understand how jenkins compiles the "recent changes" as this is exactly what I need.

1

There are 1 best solutions below

0
Christian On

Answering my own question here for whoever might be learning something from it.

github's diff api is what you're looking for.

Like so:

https://api.github.ibm.com/repos/{account}/{repo}/compare/${buildCommit}...${latestMasterCommit}