]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update PR Labeler to v5 (#26845)
authorTsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
Mon, 29 Apr 2024 04:23:49 +0000 (06:23 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2024 04:23:49 +0000 (21:23 -0700)
* Update PR Labeler to v5

* Change conflict labeler.

* Implement draft filtering functionality

* Actually, pull_request_target is appropriate here.

.github/labeler.yml
.github/workflows/conflict-labeler.yml
.github/workflows/labeler-pr.yml

index b088f229434c5dfa578b17c367cd27d76e272dec..886ce89708c82d0e7e17b841ed37a86192fdcf3c 100644 (file)
@@ -1,12 +1,18 @@
 "Changes: Sprites":
-- '**/*.rsi/*.png'
+- changed-files:
+  - any-glob-to-any-file: '**/*.rsi/*.png'
 
 "Changes: Map":
-- 'Resources/Maps/*.yml'
-- 'Resources/Prototypes/Maps/*.yml'
+- changed-files:
+  - any-glob-to-any-file:
+    - 'Resources/Maps/*.yml'
+    - 'Resources/Prototypes/Maps/*.yml'
 
 "Changes: UI":
-- '**/*.xaml*'
+- changed-files:
+  - any-glob-to-any-file: '**/*.xaml*'
 
 "No C#":
-- all: ["!**/*.cs"]
+- changed-files:
+  # Equiv to any-glob-to-all as long as this has one matcher. If ALL changed files are not C# files, then apply label.
+  - all-globs-to-all-files: "!**/*.cs"
index a78716bde68527d905d1a9eac89a1909c4e9d0cb..1e2125c30a23b9bbdd21b9d3af6a8012dc3bffc1 100644 (file)
@@ -1,18 +1,20 @@
 name: Check Merge Conflicts
 
 on:
-  push:
-    branches:
-      - master
   pull_request_target:
+    types:
+      - opened
+      - synchronize
+      - reopened
+      - ready_for_review
 
 jobs:
   Label:
-    if: github.actor != 'PJBot'
+    if: ( github.event.pull_request.draft == false ) && ( github.actor != 'PJBot' )
     runs-on: ubuntu-latest
     steps:
       - name: Check for Merge Conflicts
-        uses: ike709/actions-label-merge-conflict@9eefdd17e10566023c46d2dc6dc04fcb8ec76142
+        uses: eps1lon/actions-label-merge-conflict@v3.0.0
         with:
           dirtyLabel: "Merge Conflict"
           repoToken: "${{ secrets.GITHUB_TOKEN }}"
index 711eb0ccac01f77a52972e704175458e2fc09d8a..42ed10098120b68415f9c3c3eedccd4de49b9bcc 100644 (file)
@@ -6,8 +6,9 @@ on:
 jobs:
   labeler:
     if: github.actor != 'PJBot'
+    permissions:
+      contents: read
+      pull-requests: write
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/labeler@v3
-      with:
-        repo-token: "${{ secrets.GITHUB_TOKEN }}"
+    - uses: actions/labeler@v5