From 29fdf441a0845567bbc23aaff827bdbf295c5f63 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 24 Jul 2026 23:00:57 -0700 Subject: [PATCH 01/10] Change PR prep to create balance snippets for balance PRs --- .github/workflows/pr-preparation.yaml | 20 ++++++++++++++----- .../sections/template-snippet-balance.md | 6 ++++++ 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 changelog/snippets/sections/template-snippet-balance.md diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index 846ad718ca7..4dc6062f64f 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -38,15 +38,25 @@ jobs: - name: Add snippet working-directory: changelog/snippets + env: + PR_NUMBER: ${{ github.event.pull_request.number }} run: | # Configure git git config user.email "github@faforever.com" git config user.name "FAForever Machine User" - - FILE=category.${{ github.event.pull_request.number }}.md - cp sections/template-snippet.md $FILE - sed -i "s/XYZW/${{ github.event.pull_request.number }}/g" $FILE - + + LABELS="$(echo '${{ toJson(github.event.pull_request.labels) }}' | jq -r '.[].name')" + + if echo "$LABELS" | grep -Eq '^(area: balance|area: balance idea)$'; then + FILE="balance.${PR_NUMBER}.md" + cp sections/template-snippet-balance.md "$FILE" + sed -i "s/PR_NUMBER/${PR_NUMBER}/g" "$FILE" + else + FILE="category.${PR_NUMBER}.md" + cp sections/template-snippet.md "$FILE" + sed -i "s/XYZW/${PR_NUMBER}/g" "$FILE" + fi + git add . git commit -m "Add snippet template" git push diff --git a/changelog/snippets/sections/template-snippet-balance.md b/changelog/snippets/sections/template-snippet-balance.md new file mode 100644 index 00000000000..491537e6eaa --- /dev/null +++ b/changelog/snippets/sections/template-snippet-balance.md @@ -0,0 +1,6 @@ +{% unit %} + +{% endunit %} + (#PR_NUMBER) +- : + - : -> From 372c96ee7e1df85b27c55e7f49c3255b7c53fa09 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 24 Jul 2026 23:06:56 -0700 Subject: [PATCH 02/10] Improve label check --- .github/workflows/pr-preparation.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index 4dc6062f64f..53d47ac3ffa 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -40,14 +40,13 @@ jobs: working-directory: changelog/snippets env: PR_NUMBER: ${{ github.event.pull_request.number }} + IS_BALANCE: ${{ contains(github.event.pull_request.labels.*.name, 'area: balance') || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }} run: | # Configure git git config user.email "github@faforever.com" git config user.name "FAForever Machine User" - LABELS="$(echo '${{ toJson(github.event.pull_request.labels) }}' | jq -r '.[].name')" - - if echo "$LABELS" | grep -Eq '^(area: balance|area: balance idea)$'; then + if [ "$IS_BALANCE" = "true" ]; then FILE="balance.${PR_NUMBER}.md" cp sections/template-snippet-balance.md "$FILE" sed -i "s/PR_NUMBER/${PR_NUMBER}/g" "$FILE" From 457caa0a79cb22bdee658857630e527f4f864ab1 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 24 Jul 2026 23:51:26 -0700 Subject: [PATCH 03/10] try to fix syntax error with double quotes https://github.com/actions/runner/issues/1019 --- .github/workflows/pr-preparation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index 53d47ac3ffa..f35366fa04f 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -40,7 +40,7 @@ jobs: working-directory: changelog/snippets env: PR_NUMBER: ${{ github.event.pull_request.number }} - IS_BALANCE: ${{ contains(github.event.pull_request.labels.*.name, 'area: balance') || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }} + IS_BALANCE: "${{ contains(github.event.pull_request.labels.*.name, 'area: balance') || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }}" run: | # Configure git git config user.email "github@faforever.com" From ff6ba9876929d58aa96ab8463d690b3c2879bc39 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Sat, 25 Jul 2026 14:58:14 -0700 Subject: [PATCH 04/10] Fix category choices in documentation not being on new lines --- docs/development-changelog.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/development-changelog.md b/docs/development-changelog.md index eba48120832..bb7b98106bc 100644 --- a/docs/development-changelog.md +++ b/docs/development-changelog.md @@ -26,13 +26,13 @@ The format of a snippet depends on whether it is a [balance snippet](../developm ### Choosing a category -`graphics` is everything graphics related. -`ai` is everything AI related, for example new features that AI modders can use, or new capabilities of the AI. -`performance` is for changes that were made to increase the performance of the game. -`balance` are changes that are made to improve the balance of the game. -`features` is for new features that are available for the players in the game. -`fix` is for fixes of bugs in the game. Bugs regarding intellisense or other areas outside of the game should go into `other`. -`other` Refactors, changes for developers and modders, code annotations and the like fall into this category. +1. `graphics` is everything graphics related. +2. `ai` is everything AI related, for example new features that AI modders can use, or new capabilities of the AI. +3. `performance` is for changes that were made to increase the performance of the game. +4. `balance` are changes that are made to improve the balance of the game. +5. `features` is for new features that are available for the players in the game. +6. `fix` is for fixes of bugs in the game. Bugs regarding intellisense or other areas outside of the game should go into `other`. +7. `other` Refactors, changes for developers and modders, code annotations and the like fall into this category. If multiple categories are fitting, use the one that appears first in this list. From 5900e753cd36fd08ae3b0e63064a9a5e09e0599e Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Sat, 25 Jul 2026 15:17:04 -0700 Subject: [PATCH 05/10] Add the remaining category creation except features and performance, no label for those --- .github/workflows/pr-preparation.yaml | 39 ++++++++++++++----- .../snippets/sections/template-snippet.md | 2 +- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index f35366fa04f..e9d47956455 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -40,21 +40,42 @@ jobs: working-directory: changelog/snippets env: PR_NUMBER: ${{ github.event.pull_request.number }} - IS_BALANCE: "${{ contains(github.event.pull_request.labels.*.name, 'area: balance') || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }}" + # Priority order as documented in /docs/development-changelog.md + IS_GRAPHICS: "${{ contains(github.event.pull_request.labels.*.name, 'area: graphics') }}" + IS_AI: "${{ contains(github.event.pull_request.labels.*.name, 'area: AI') }}" + # Performance snippet category - no associated label + IS_BALANCE: | + "${{ contains(github.event.pull_request.labels.*.name, 'area: balance') + || contains(github.event.pull_request.labels.*.name, 'area: balance idea') + }}" + # Features snippet category - no associated label + IS_FIX: "${{ contains(github.event.pull_request.labels.*.name, 'type: bug') }}" + IS_OTHER: | + "${{ contains(github.event.pull_request.labels.*.name, 'area: documentation') + || contains(github.event.pull_request.labels.*.name, 'area: tooling') + }}" run: | # Configure git git config user.email "github@faforever.com" git config user.name "FAForever Machine User" - if [ "$IS_BALANCE" = "true" ]; then - FILE="balance.${PR_NUMBER}.md" - cp sections/template-snippet-balance.md "$FILE" - sed -i "s/PR_NUMBER/${PR_NUMBER}/g" "$FILE" - else - FILE="category.${PR_NUMBER}.md" - cp sections/template-snippet.md "$FILE" - sed -i "s/XYZW/${PR_NUMBER}/g" "$FILE" + category="category" + template="sections/template-snippet.md" + if [ "$IS_GRAPHICS" = "true" ]; then + category="graphics" + elif [ "$IS_AI" = "true" ]; then + category="ai" + elif [ "$IS_BALANCE" = "true" ]; then + category="balance" + template="sections/template-snippet-balance.md" + elif [ "$IS_FIX" = "true" ]; then + category="fix" + elif [ "$IS_OTHER" = "true" ]; then + category="other" fi + file="${category}.${PR_NUMBER}.md" + cp "$template" "$file" + sed -i "s/PR_NUMBER/${PR_NUMBER}/g" "$file" git add . git commit -m "Add snippet template" diff --git a/changelog/snippets/sections/template-snippet.md b/changelog/snippets/sections/template-snippet.md index 6dd6508f92e..05b18148d99 100644 --- a/changelog/snippets/sections/template-snippet.md +++ b/changelog/snippets/sections/template-snippet.md @@ -1 +1 @@ -- Your explanation here... [Don't forget to change the category in the filename] (#XYZW). +- Your explanation here... [Don't forget to change the category in the filename] (#PR_NUMBER). From 20215691821121624a131828c3926c2a66114e6e Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 6 Aug 2026 01:30:17 -0700 Subject: [PATCH 06/10] Avoid newlines and quotes in the env values --- .github/workflows/pr-preparation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index e9d47956455..90732b183be 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -44,13 +44,13 @@ jobs: IS_GRAPHICS: "${{ contains(github.event.pull_request.labels.*.name, 'area: graphics') }}" IS_AI: "${{ contains(github.event.pull_request.labels.*.name, 'area: AI') }}" # Performance snippet category - no associated label - IS_BALANCE: | + IS_BALANCE: > "${{ contains(github.event.pull_request.labels.*.name, 'area: balance') || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }}" # Features snippet category - no associated label IS_FIX: "${{ contains(github.event.pull_request.labels.*.name, 'type: bug') }}" - IS_OTHER: | + IS_OTHER: > "${{ contains(github.event.pull_request.labels.*.name, 'area: documentation') || contains(github.event.pull_request.labels.*.name, 'area: tooling') }}" From fde08e956bde3a014a36567ccfc5c0118d59132e Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 6 Aug 2026 01:34:20 -0700 Subject: [PATCH 07/10] Prioritize "other" category over bug fixes all fix category snippets should be game bug fixes, so need to check that fixes aren't for tooling or docs first --- .github/workflows/pr-preparation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index 90732b183be..ec9a597e27b 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -49,11 +49,11 @@ jobs: || contains(github.event.pull_request.labels.*.name, 'area: balance idea') }}" # Features snippet category - no associated label - IS_FIX: "${{ contains(github.event.pull_request.labels.*.name, 'type: bug') }}" IS_OTHER: > "${{ contains(github.event.pull_request.labels.*.name, 'area: documentation') || contains(github.event.pull_request.labels.*.name, 'area: tooling') }}" + IS_FIX: "${{ contains(github.event.pull_request.labels.*.name, 'type: bug') }}" run: | # Configure git git config user.email "github@faforever.com" @@ -68,10 +68,10 @@ jobs: elif [ "$IS_BALANCE" = "true" ]; then category="balance" template="sections/template-snippet-balance.md" - elif [ "$IS_FIX" = "true" ]; then - category="fix" elif [ "$IS_OTHER" = "true" ]; then category="other" + elif [ "$IS_FIX" = "true" ]; then + category="fix" fi file="${category}.${PR_NUMBER}.md" cp "$template" "$file" From a8b4cae422f3f3f229fa127dd17dc107aa49ac70 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 6 Aug 2026 01:36:59 -0700 Subject: [PATCH 08/10] Correct grammar in category documentation --- docs/development-changelog.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development-changelog.md b/docs/development-changelog.md index bb7b98106bc..0968001de2d 100644 --- a/docs/development-changelog.md +++ b/docs/development-changelog.md @@ -26,13 +26,13 @@ The format of a snippet depends on whether it is a [balance snippet](../developm ### Choosing a category -1. `graphics` is everything graphics related. -2. `ai` is everything AI related, for example new features that AI modders can use, or new capabilities of the AI. +1. `graphics` is everything graphics-related. +2. `ai` is everything AI-related, for example new features that AI modders can use, or new capabilities of the AI. 3. `performance` is for changes that were made to increase the performance of the game. 4. `balance` are changes that are made to improve the balance of the game. 5. `features` is for new features that are available for the players in the game. 6. `fix` is for fixes of bugs in the game. Bugs regarding intellisense or other areas outside of the game should go into `other`. -7. `other` Refactors, changes for developers and modders, code annotations and the like fall into this category. +7. `other` is for Refactors, changes for developers and modders, code annotations and the like fall into this category. If multiple categories are fitting, use the one that appears first in this list. From 9b52e4b0a16638ba75afb00d0bc1314d44a92950 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 6 Aug 2026 01:40:08 -0700 Subject: [PATCH 09/10] Ignore "area: balance" for creating balance snippets --- .github/workflows/pr-preparation.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pr-preparation.yaml b/.github/workflows/pr-preparation.yaml index ec9a597e27b..6ee1191b83e 100644 --- a/.github/workflows/pr-preparation.yaml +++ b/.github/workflows/pr-preparation.yaml @@ -44,10 +44,7 @@ jobs: IS_GRAPHICS: "${{ contains(github.event.pull_request.labels.*.name, 'area: graphics') }}" IS_AI: "${{ contains(github.event.pull_request.labels.*.name, 'area: AI') }}" # Performance snippet category - no associated label - IS_BALANCE: > - "${{ contains(github.event.pull_request.labels.*.name, 'area: balance') - || contains(github.event.pull_request.labels.*.name, 'area: balance idea') - }}" + IS_BALANCE: "${{ contains(github.event.pull_request.labels.*.name, 'area: balance idea') }}" # Features snippet category - no associated label IS_OTHER: > "${{ contains(github.event.pull_request.labels.*.name, 'area: documentation') From 3e840e135bbcfe80f4e9bb24319724540ef88f13 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 6 Aug 2026 03:36:39 -0700 Subject: [PATCH 10/10] Further grammar fixes --- docs/development-changelog.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development-changelog.md b/docs/development-changelog.md index 0968001de2d..12ae1e3dd57 100644 --- a/docs/development-changelog.md +++ b/docs/development-changelog.md @@ -29,10 +29,10 @@ The format of a snippet depends on whether it is a [balance snippet](../developm 1. `graphics` is everything graphics-related. 2. `ai` is everything AI-related, for example new features that AI modders can use, or new capabilities of the AI. 3. `performance` is for changes that were made to increase the performance of the game. -4. `balance` are changes that are made to improve the balance of the game. +4. `balance` is for changes that are made to improve the balance of the game. 5. `features` is for new features that are available for the players in the game. -6. `fix` is for fixes of bugs in the game. Bugs regarding intellisense or other areas outside of the game should go into `other`. -7. `other` is for Refactors, changes for developers and modders, code annotations and the like fall into this category. +6. `fix` is for fixes of bugs in the game. Bugs regarding IntelliSense or other areas outside the game should go into `other`. +7. `other` is for refactors, changes for developers and modders, and code annotations. If multiple categories are fitting, use the one that appears first in this list.