Difference between revisions of "Guide to Changelogs"
imported>Oranges m (You should also change author field) |
imported>Deantwo (→Pull Requests: Updated a little to be more understandable. Added examples for file names and file contect.) |
||
Line 10: | Line 10: | ||
PR changelogs are temporary and just get deleted after they're merged into the master changelog. | PR changelogs are temporary and just get deleted after they're merged into the master changelog. | ||
− | # Create html/changelogs/USERNAME-PR-###.yml, where ### is the number or ID of your PR or the name of the branch | + | # Create <code>html/changelogs/''USERNAME''-PR-''####''.yml</code>. |
+ | ## Go to <code>/master/html/changelogs/</code> on your branch. | ||
+ | ## Create file <code>''USERNAME''-PR-''####''.yml</code> in the folder, where #### is the number or ID of your PR or the name of the branch. | ||
+ | ##* Example: <code>Deantwo-PR-7445.yml</code> or <code>Deantwo-PR-ChemMasterGetsGloomy.yml</code> | ||
+ | ##* File name is not super important but helps the maintainers know who made the file and which PR it is related too. Also prevents conflicts since two files won't have the same name. | ||
# Copy the contents of [https://github.com/tgstation/-tg-station/blob/master/html/changelogs/example.yml this]. | # Copy the contents of [https://github.com/tgstation/-tg-station/blob/master/html/changelogs/example.yml this]. | ||
− | # Fill it out. | + | # Fill it out. |
#* Make sure to set delete-after to true. | #* Make sure to set delete-after to true. | ||
− | #* Also ensure you update the author name so you get credited appropriately | + | #* Also ensure you update the author name so you get credited appropriately. |
# '''PROOFREAD.''' Changelog entries are final after they're merged. | # '''PROOFREAD.''' Changelog entries are final after they're merged. | ||
# Add it to git so it's included with your PR. | # Add it to git so it's included with your PR. | ||
+ | |||
+ | '''File content example:''' | ||
+ | author: Deantwo | ||
+ | |||
+ | delete-after: True | ||
+ | |||
+ | changes: | ||
+ | - rscadd: "Added grenades for everyone." | ||
+ | - rscdel: "Removed everyone's brains." | ||
=== Maintainer Changelogs === | === Maintainer Changelogs === |
Revision as of 13:29, 8 February 2015
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.
The idea is to reduce merge conflicts caused by two PRs trying to edit the same file.
Creating a Changelog
Pull Requests
PR changelogs are temporary and just get deleted after they're merged into the master changelog.
- Create
html/changelogs/USERNAME-PR-####.yml
.- Go to
/master/html/changelogs/
on your branch. - Create file
USERNAME-PR-####.yml
in the folder, where #### is the number or ID of your PR or the name of the branch.- Example:
Deantwo-PR-7445.yml
orDeantwo-PR-ChemMasterGetsGloomy.yml
- File name is not super important but helps the maintainers know who made the file and which PR it is related too. Also prevents conflicts since two files won't have the same name.
- Example:
- 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 grenades for everyone." - rscdel: "Removed everyone's brains."
Maintainer Changelogs
Maintainers can have their own changelogs. Follow the same directions as above, but use USERNAME.yml and leave delete-after false.
Updating the Changelog
- Only maintainers need to do this.
- First, install python 2.7, 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
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.)