Guide to Changelogs
Changelogs are small YAML files that developers create to add their pull requests' changes to the master changelog.html file. A python script run by a maintainer collects all the changes specified and generates the HTML necessary, merging changes by the same author during the same day.
On the /tg/station Github changelogs can be automatically generated from special formatting in the body of a PR's description.
The idea is to reduce merge conflicts caused by two PRs trying to edit the same file.
Creating a Changelog[edit | edit source]
Online auto-creation[edit | edit source]
By formatting text in the body of your PR description you can have a changelog .yml file automatically generated for you. Declare the start of a changelog entry with :cl: and close it with /:cl:; anything in between these two tags will included, remember to use prefixes for each line. See below for a list of valid prefixes. An author can be set after the :cl: tag, if omitted your Github username will be used by default.
:cl: Deantwo rscadd: Added laser rifles for everyone. rscdel: Removed everyone's brains. /:cl:
Committing a .yml file[edit | edit source]
PR changelogs are temporary and just get deleted after they're merged into the master changelog.
- Go to
/master/html/changelogs/on your branch.
- Create file
USERNAME-BRANCHNAME.ymlin the folder, where 'BRANCHNAME' the name of the branch on your fork and 'USERNAME' is your github username.
- File name is not super important but helps the maintainers know who made the file and which PR it is related to. Also prevents conflicts since two files won't have the same name.
- Go to
- Copy the contents of this.
- Fill it out.
- Make sure to set delete-after to true.
- Also ensure you update the author name so you get credited appropriately.
- PROOFREAD. Changelog entries are final after they're merged.
- Add it to git so it's included with your PR.
File content example:
author: Deantwo delete-after: True changes: - rscadd: "Added laser rifles for everyone." - rscdel: "Removed everyone's brains."
Updating the Changelog[edit | edit source]
- Only maintainers need to do this.
- First, install python3, pip, and PyYaml:
- After installing python and ensuring it and its Scripts/ folder is in PATH, download and run get-pip.py with python.
- Once pip is installed run the following commands in your terminal
pip install PyYaml
pip install beautifulsoup4
- With /tg/station's code, simply run makeChangelog.bat.
- On Linux or other codebases, run
python tools/ss13_genchangelog.py html/changelog.html html/changelogs
Screwed up Changelog[edit | edit source]
If a changelog needs to be edited after merge, a maintainer will need to edit the html/changelogs/.all_changelog.yml file in order to fix the database. (This file is hidden on Linux and Mac OSX.)
Valid Prefixes[edit | edit source]
Any of these prefixes can be used when creating a changelog.