Changelog Messages

Most studios that use version control use Perforce, but many will want to be able to track patch notes for what’s come in for a given update.

Often, these are written with specific formatting to auto-update Jira tasks, Slack channels, and more.

At my previous studio, we decided to add a #patch keyword to CLs that would let production and marketing know if something was Patch Note worthy and when it should be announced.

# Sample changelog comment with the patch keyword
HD-1234 #ready #comment Revised sfx and music in main menu #patch p1

From Changelogs to Patch Notes

While it’s possible to manually gather that data, with Perforce CLI commands and Python, we can create CSV/Google Sheet views that can help simplify this process.

image.png

image.png

Jira Authentication

While this script can run without doing Jira checks, it’s highly recommended you do so in order to know the status of the Jiras related to each CL entry (especially for statuses like Fix Failed, as you don’t want to announce a patch note for something that wasn’t actually fixed or added to the game).

When running the script, you can use Jira authentication by passing in your Jira username (usually email) and having a jira.keytab file whose contents are an API token secret you keep secure on your computer.

You can generate an API token to fill the jira.keytab file (you will need to do this each time the token expires) from the Atlassian website here: https://id.atlassian.com/manage-profile/security/api-tokens

Sample Script Flow

The following script is a naive one that ideally works with CLs with the #patch keyword and can mark CL entries as good or bad based on Jira statuses or ‘undo’ status of further CLs.

It works by scraping the text of each message and writer and doing several things: