Eagle Black Ltd

Creating release notes from Git in a monorepo

When working in a monorepo it can become difficult to create release notes for each individual app. Below is a strategy for generating sharable release notes generated from Pull Request comments to the main branch, broken down by app.

First we need to enfore a standard way of writing PR titles

[XXXX - <App Name> - <Title> - Please use the Work Item number and Title as PR Name, not subtasks. Please use package name for app name if working in libs]

Using git get the commit messages to master since the last release, and limit changes to a single app in the mono repo.

git log --first-parent master --pretty="%s [%an], [%an]" --date=iso --since="2022-05-17T07:00" -- apps/my-app

Copying these to a spreadsheet, then use regular expressions to extract links to the PR, Work item, components effected and Developer

PR

=HYPERLINK(CONCATENATE("https://my-git-repo/pullrequest/",REGEXEXTRACT(D2, "Merged PR (\+?\d+)")),REGEXEXTRACT(D2, "Merged PR (\+?\d+)"))

Work Item

=HYPERLINK(CONCATENATE("https://my-work-board/_search?text=",REGEXEXTRACT(D2, ": (\+?\d+)"),"&type=workitem"),REGEXEXTRACT(D2, ": (\+?\d+)"))

Component

=REGEXEXTRACT(D974,"- (.*) -")

Developer

=MID(D2,FIND("[",D2)+1,FIND("]",D2)-FIND("[",D2)-1)