mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
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. <details> <summary>Screenshots/Videos</summary> </details> ## Changelog Nothing player facing.
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user