keto23
keto23

Reputation: 1207

Automatically write changelog to CHANGELOG.md in GitHub

Is there any way to automatically generate change logs from commit messages to a file called CHANGELOG.md in a GitHub repo?

Might be possible using a service hook on a repo?

Upvotes: 12

Views: 14157

Answers (3)

mukul
mukul

Reputation: 55

I have created a GitHub app 'Changelogg.io' to automate changelog from merged pull requests.

It detects changes mentioned in the PRs and creates a release draft for it. After adding the release version, it automatically updates CHANGELOG.md and also has a web UI with filters for the generated changelog. Few other features:

  • Insights generated from changes (Stats like bugs to feature ratio, Trend over time for repository)
  • Slack Integration for each repository

Youtube Walkthrough

Upvotes: 1

Martin Seeler
Martin Seeler

Reputation: 6982

I have written something like this some months ago. It is based on Git's porcelain and uses a git hook in plain bash.

You can find it in my Github Repo.

Upvotes: 8

VonC
VonC

Reputation: 1323613

Since the May 2013 File CRUD API with this API, it should be possible to script it by:

  • parsing the git log message
  • using the result to update the CHANGELOG.md file

See Update file:

PUT /repos/:owner/:repo/contents/:path

You actually can trigger that script from a GitHub post-receive hook, except that hook won't execute it directly, but POST a JSON message to a server of yours, which, on the reception of that specific message, will know how to update the GitHub CHANGELOG.md file (through API call mentioned above).

Upvotes: 3

Related Questions