From 81fb52c0412bef84f625d8870bf80f615f4a89d9 Mon Sep 17 00:00:00 2001 From: mirrorcult Date: Mon, 10 Jan 2022 16:06:08 -0700 Subject: [PATCH] Auto-labeling actions for pull requests (#6117) --- .github/keylabeler.yml | 41 ----------------------- .github/labeler.yml | 12 +++++++ .github/workflows/labeler-needsreview.yml | 16 +++++++++ .github/workflows/labeler-pr.yml | 12 +++++++ 4 files changed, 40 insertions(+), 41 deletions(-) delete mode 100644 .github/keylabeler.yml create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler-needsreview.yml create mode 100644 .github/workflows/labeler-pr.yml diff --git a/.github/keylabeler.yml b/.github/keylabeler.yml deleted file mode 100644 index f7be4e3e888..00000000000 --- a/.github/keylabeler.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Determines if we search the title (optional). Defaults to true. -matchTitle: false - -# Determines if we search the body (optional). Defaults to true. -matchBody: true - -# Determines if label matching is case sensitive (optional). Defaults to true. -caseSensitive: false - -# Explicit keyword mappings to labels. Form of match:label. Required. -labelMappings: - "[ATMOS]": "Area: Atmos" - "[BODY]": "Area: Body System" - "[BODY SYSTEM]": "Area: Body System" - "[CONSTRUCTION]": "Area: Construction" - "[ENTITY AI]": "Area: Entity AI" - "[PHYSICS]": "Area: Physics" - "[POWER]": "Area: Power" - "[TOOLING]": "Area: Tooling" - "[UI]": "Area: UI" - - "[BUG]": "Type: Bug" - "[CLEANUP]": "Type: Cleanup" - "[CLEAN]": "Type: Cleanup" - "[CLEANLINESS]": "Type: Cleanup" - "[DISCUSSION]": "Type: Discussion" - "[DISCUSS]": "Type: Discussion" - "[FEATURE]": "Type: Feature" - "[FEAT]": "Type: Feature" - "[IMPROVEMENT]": "Type: Improvement" - "[IMPROVE]": "Type: Improvement" - "[PERFORMANCE]": "Type: Performance" - "[PERF]": "Type: Performance" - "[REFACTOR]": "Type: Refactor" - - "[HELP WANTED]": "Status: Help Wanted" - "[DO NOT MERGE]": "Status: DO NOT MERGE" - "[DNM]": "Status: DO NOT MERGE" - - "[RESOURCES]": "Resources (No code)" - "[NOCODE]": "Resources (No code)" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000000..b088f229434 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,12 @@ +"Changes: Sprites": +- '**/*.rsi/*.png' + +"Changes: Map": +- 'Resources/Maps/*.yml' +- 'Resources/Prototypes/Maps/*.yml' + +"Changes: UI": +- '**/*.xaml*' + +"No C#": +- all: ["!**/*.cs"] diff --git a/.github/workflows/labeler-needsreview.yml b/.github/workflows/labeler-needsreview.yml new file mode 100644 index 00000000000..311048acb0f --- /dev/null +++ b/.github/workflows/labeler-needsreview.yml @@ -0,0 +1,16 @@ +name: "Labels: Review" + +on: + pull_request_target: + types: [review_requested] + +jobs: + add_label: + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "Status: Needs Review" + - uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: "Status: Awaiting Changes" diff --git a/.github/workflows/labeler-pr.yml b/.github/workflows/labeler-pr.yml new file mode 100644 index 00000000000..d4775570316 --- /dev/null +++ b/.github/workflows/labeler-pr.yml @@ -0,0 +1,12 @@ +name: "Labels: PR" + +on: +- pull_request_target + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"