GeneralsGamePatch icon indicating copy to clipboard operation
GeneralsGamePatch copied to clipboard

Chore: Automatic YAML changelog generation

Open ShizCalev opened this issue 1 year ago • 1 comments

Missed the meeting, but it's definitely possible for YMAL changelogs to be automatically generated from PR's. We have it implemented over at https://github.com/tgstation/tgstation Unfortunately I'm not too familiar with setting up git workflows, so someone else would have to implement it.

How we have it set up:

  1. User opens a PR, the PR template has the changelog template already, which the user fills out themselves Image

Image

Example: Image (Words after the first 🆑 tag are the name used for the changelog, otherwise they're anonymous.)

  1. On PR merge, a YMAL file gets generated in html/changelogs If a user makes a mistake & forgets something, they can manually generate a changelog YMAL file in this folder as well.

  2. All changelogs then get compiled into a larger yml for the entire month: https://github.com/tgstation/tgstation/blob/master/html/changelogs/archive/2025-03.yml

Relevant files (all code is GPL v3): https://github.com/tgstation/tgstation/blob/master/.github/PULL_REQUEST_TEMPLATE.md https://github.com/tgstation/tgstation/tree/master/.github/workflows/auto_changelog.yml https://github.com/tgstation/tgstation/tree/master/.github/workflows/compile_changelogs.yml https://github.com/tgstation/tgstation/tree/master/tools/WebhookProcessor/github_webhook_processor.php https://github.com/tgstation/tgstation/tree/master/tools/WebhookProcessor/secret.php (has a flag to make changelogs manditory - $require_changelogs) https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/autoChangelog.js https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/autoChangelog.test.js https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/changelogConfig.js https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/changelogParser.js https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/changelogParser.test.js https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/package.json https://github.com/tgstation/tgstation/tree/master/tools/pull_request_hooks/removeGuideComments.js (strips the guide comments from the PR template) https://github.com/tgstation/tgstation/tree/master/tools/ss13_genchangelog.py https://github.com/tgstation/tgstation/tree/master/tools/requirements.txt https://github.com/tgstation/tgstation/tree/master/tools/ci/check_changelogs.sh https://github.com/tgstation/tgstation/tree/master/html/changelogs

Optional improvement: https://github.com/tgstation/tgstation/tree/master/tools/pull_requests/autoLabel.js https://github.com/tgstation/tgstation/tree/master/tools/pull_requests/autoLabelConfig.js automatically labels PR's based off their changelog

ShizCalev avatar Mar 09 '25 16:03 ShizCalev

I will investigate, maybe the workflow you described is not exactly what we need here but I can look at the general idea.

tintinhamans avatar Mar 09 '25 22:03 tintinhamans