Browse Source

Update labeler and add auto assign to PRs

Gonzalo Pena-Castellanos 3 years ago
parent
commit
fd5e53b446
2 changed files with 23 additions and 14 deletions
  1. 15 0
      .github/workflows/auto_author_assign.yml
  2. 8 14
      .github/workflows/labeler.yml

+ 15 - 0
.github/workflows/auto_author_assign.yml

@@ -0,0 +1,15 @@
+# https://github.com/marketplace/actions/auto-author-assign
+name: 'Auto Author Assign'
+
+on:
+  pull_request_target:
+    types: [opened, reopened]
+
+permissions:
+  pull-requests: write
+
+jobs:
+  assign-author:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: toshimaru/auto-author-assign@v1.3.4

+ 8 - 14
.github/workflows/labeler.yml

@@ -1,19 +1,13 @@
-name: Pull Request Labeler
-# This workflow is supposed to run every 5 minutes
+# https://github.com/marketplace/actions/labeler
+name: "Pull Request Labeler"
 on:
-  schedule:
-    - cron: '*/20 * * * *'
-permissions:
-  pull-requests:
-    write
+- pull_request_target
+
 jobs:
   triage:
     name: Update PR Labels
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
     steps:
-      - if: github.repository == 'jupyterlab/jupyterlab'
-        uses: paulfantom/periodic-labeler@dffbc90404f371f76444a69221c2f7ad079e2319
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          GITHUB_REPOSITORY: ${{ github.repository }}
-          LABEL_MAPPINGS_FILE: .github/labeler.yml
+    - uses: actions/labeler@main
+      env:
+        repo-token: "${{ secrets.GITHUB_TOKEN }}"