From b3dc6447359f9383403b21d3bc0f53daef2a1d39 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 26 May 2026 09:42:46 -0400 Subject: [PATCH] Hopefully fixes autolabeler [NO GBP] (#5677) ## About The Pull Request The NO GBP is SOLELY there to test that it automatically assigns the labels. In theory this will work. TL;DR for why it was broken: /tg/ moved the autolabeler stuff to be a part of GBP. ## Why It's Good For The Game Less work for maintainers. ## Proof Of Testing If this automatically adds the No GBP label, in theory this works.
Screenshots/Videos
## Changelog Nothing player facing. --- .github/workflows/labeler.yml | 28 +++++++++++++++++---- tools/pull_request_hooks/autoLabelConfig.js | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 0137985e4ac..9252d2394ae 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,11 +1,29 @@ +# THIS IS A BUBBER WORKFLOW FILE name: PR Labeling on: - - pull_request_target + pull_request_target: + types: [closed, opened, synchronize] jobs: + # labeler must run before gbp because gbp calculates itself based on labels labeler: + runs-on: ubuntu-24.04 + if: github.event.action == 'opened' || github.event.action == 'synchronize' permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest + pull-requests: write # to apply labels + issues: write # to apply labels steps: - - uses: actions/labeler@v5 + - name: Checkout + uses: actions/checkout@v6 + - name: Run Auto Labeler + uses: actions/github-script@v9 + with: + script: | + const { get_updated_label_set } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoLabel.js'); + const new_labels = await get_updated_label_set({ github, context }); + github.rest.issues.setLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: new_labels, + }); + console.log(`Labels updated: ${new_labels}`); diff --git a/tools/pull_request_hooks/autoLabelConfig.js b/tools/pull_request_hooks/autoLabelConfig.js index 6d848fa715c..b2ae43e5143 100644 --- a/tools/pull_request_hooks/autoLabelConfig.js +++ b/tools/pull_request_hooks/autoLabelConfig.js @@ -78,7 +78,7 @@ export const changelog_labels = { default_text: "fixed a few things", keywords: ["fix", "fixes", "bugfix"], }, - "Quality of Life": { + "QoL": { default_text: "made something easier to use", keywords: ["qol"], },