This tool helps extract release notes from GitHub pull requests in Mattermost repositories. It retrieves PRs with the "release-note" label from selected milestones and displays their release notes.
You need a GitHub API token with appropriate permissions to access the repositories:
- Go to your GitHub account settings
- Select "Developer settings" from the left sidebar
- Click on "Personal access tokens" > "Tokens (classic)"
- Click "Generate new token" > "Generate new token (classic)"
- Give your token a name and select the following scopes:
repo
(Full control of private repositories)
- Click "Generate token"
- Copy the token (you won't be able to see it again!)
If your GitHub organization uses SAML SSO (Single Sign-On):
- After creating your token, go to the token's page
- Under "Organization access", find your organization
- Click "Configure SSO"
- Click "Authorize" for your organization
- Complete the SAML authentication process if prompted
-
Install the tool using Go:
go install github.com/jespino/github-mm-release-notes@latest
-
Run the tool with your GitHub token in one of these ways:
Command line flag (preferred):
github-mm-release-notes --token=YOUR_TOKEN_HERE
Environment variable:
export GITHUB_TOKEN=YOUR_TOKEN_HERE github-mm-release-notes
Note: The tool will fall back to using any token stored in the code (if any), but this is not recommended.
Important: If you don't provide a GitHub token, the tool will run as an unauthenticated user. This will work for the public Mattermost repository, but you won't be able to access the private Enterprise repository.
-
Follow the interactive prompts:
- Select a repository (mattermost/mattermost, mattermost/enterprise, or both)
- Select a milestone from the displayed list
- The tool will display all PRs with the "release-note" label in that milestone
The tool attempts to extract release notes from PR descriptions in several formats:
-
Code blocks with release-note tag:
Your release note here
-
Markdown section titled "Release Note"
-
Simple "release-note:" prefix
-
Any paragraph mentioning "release note"