Files
Bubberstation/tools/pull_request_hooks/autoChangelog.test.js
Mothblocks 8bb8ca9d67 Move auto changelog generation into its own workflow (#70652)
I wanted to move auto labeling into its own workflow, but realized that it and changelog generation were coupled. So I'm detaching that first, and then will work on auto labeling later. Includes general code for a changelog parser so that I can reuse it by that point.

GitHub actions are great for downstreams, as setting up a PHP server for the webhook is not trivial, compared to Existing and getting it for free. They are also much more straightforward to test and update than the webhook. I was able to verify this was working trivially with an empty repository.

Tested and working: Mothblocks/ss13-workflow-testing@0a2de4d
2022-10-27 16:52:32 +13:00

22 lines
418 B
JavaScript

import assert from "node:assert/strict";
import { changelogToYml } from "./autoChangelog.js";
import { parseChangelog } from "./changelogParser.js";
assert.equal(
changelogToYml(
parseChangelog(`
My cool PR!
:cl: DenverCoder9
add: Adds new stuff
add: Adds more stuff
/:cl:
`)
),
`author: "DenverCoder9"
delete-after: True
changes:
- rscadd: "Adds new stuff"
- rscadd: "Adds more stuff"`
);