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

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


The following commit(s) were added to refs/heads/master by this push:
     new f4473afccd feat: configuring an extensible PR auto-labeler (#26880)
f4473afccd is described below

commit f4473afccd94affdd1506cbf2a797af31d719110
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Tue Jan 30 09:26:34 2024 -0800

    feat: configuring an extensible PR auto-labeler (#26880)
---
 .github/labeler.yml                      | 20 ++++++++++++++++++++
 .github/workflows/label-migration-pr.yml | 25 -------------------------
 .github/workflows/labeler.yml            | 12 ++++++++++++
 superset/migrations/env.py               |  1 +
 4 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 0000000000..0557e4277a
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,20 @@
+"risk:db-migration":
+- changed-files:
+  - any-glob-to-any-file:
+    - 'superset/migrations/**'
+
+"dependencies:python":
+- changed-files:
+  - any-glob-to-any-file:
+    - 'superset/requirements/**'
+
+"dependencies:npm":
+- changed-files:
+  - any-glob-to-any-file:
+    - 'superset-frontend/package.json'
+    - 'superset-frontend/package-lock.json'
+
+"doc":
+- changed-files:
+  - any-glob-to-any-file:
+    - 'docs/**'
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..9b8195b51a
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,12 @@
+name: "Pull Request Labeler"
+on:
+- pull_request
+
+jobs:
+  labeler:
+    permissions:
+      contents: read
+      pull-requests: write
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/labeler@v5
diff --git a/superset/migrations/env.py b/superset/migrations/env.py
index 130fb367fb..ab9dea7855 100755
--- a/superset/migrations/env.py
+++ b/superset/migrations/env.py
@@ -14,6 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+
 import logging
 import urllib.parse
 from logging.config import fileConfig

Reply via email to