You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/01/30 02:50:10 UTC

(superset) 01/02: feat(ci): bring the github auto-labeler

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch labeler
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 1349d6f5f288f27e1ee0ec68d61195f432c96237
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon Jan 29 17:40:59 2024 -0800

    feat(ci): bring the github auto-labeler
---
 .github/labeler.yml                      |  4 ++++
 .github/workflows/label-migration-pr.yml | 25 -------------------------
 .github/workflows/labeler.yml            | 12 ++++++++++++
 3 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 0000000000..555f217cf9
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,4 @@
+"risk:db-migration":
+- changed-files:
+  - any-glob-to-any-file:
+    - 'superset/migrations/**'
diff --git a/.github/workflows/label-migration-pr.yml b/.github/workflows/label-migration-pr.yml
deleted file mode 100644
index e0b46e163c..0000000000
--- a/.github/workflows/label-migration-pr.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Label Migration PR
-
-on:
-  pull_request:
-    paths:
-      - 'superset/migrations/**'
-
-jobs:
-  label:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v2
-
-      - name: Add label
-        uses: actions/github-script@v3
-        with:
-          github-token: ${{github.token}}
-          script: |
-            github.issues.addLabels({
-                issue_number: context.issue.number,
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                labels: ['risk:db-migration']
-            })
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index 0000000000..e57cd86e2b
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,12 @@
+name: "Pull Request Labeler"
+on:
+- pull_request_target
+
+jobs:
+  labeler:
+    permissions:
+      contents: read
+      pull-requests: write
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/labeler@v5