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

xushiyan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hudi-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new e713b48  chore: configure labeler for PRs from forked repos (#83)
e713b48 is described below

commit e713b485117232230bb83c798726e8c680610310
Author: Shiyan Xu <[email protected]>
AuthorDate: Fri Jul 19 14:59:50 2024 -0500

    chore: configure labeler for PRs from forked repos (#83)
---
 .github/{workflows/pr.yml => labeler.yml} | 43 ++++++++++++++++++-------------
 .github/workflows/pr.yml                  | 10 +++++--
 2 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/pr.yml b/.github/labeler.yml
similarity index 57%
copy from .github/workflows/pr.yml
copy to .github/labeler.yml
index 13f3c13..06a6ccf 100644
--- a/.github/workflows/pr.yml
+++ b/.github/labeler.yml
@@ -15,23 +15,30 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: PR
+rust:
+  - changed-files:
+      - any-glob-to-any-file: 'crates/**'
 
-on:
-  pull_request:
-    types: [ opened, edited, reopened, synchronize ]
-    branches:
-      - main
+python:
+  - changed-files:
+      - any-glob-to-any-file: 'python/**'
 
-jobs:
-  check_title:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-        with:
-          node-version: '20.x'
-      - name: Linting
-        run: |
-          npm i -g conventional-changelog-conventionalcommits
-          npm i -g commitlint@latest
-          echo ${{ github.event.pull_request.title }} | npx commitlint
+documentation:
+  - changed-files:
+      - any-glob-to-any-file:
+          - '*.md'
+
+ci:
+  - changed-files:
+      - any-globs-to-all-files:
+          - '.github/workflows/ci.yml'
+          - '.github/workflows/release.yml'
+
+dev-x:
+  - changed-files:
+      - any-glob-to-any-file:
+          - '.github/**'
+          - '*.yaml'
+      - all-globs-to-all-files:
+          - '!.github/workflows/ci.yml'
+          - '!.github/workflows/release.yml'
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 13f3c13..ef127ec 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -18,13 +18,17 @@
 name: PR
 
 on:
-  pull_request:
+  pull_request_target:
     types: [ opened, edited, reopened, synchronize ]
     branches:
       - main
 
+permissions:
+  contents: read
+  pull-requests: write
+
 jobs:
-  check_title:
+  compliance:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
@@ -35,3 +39,5 @@ jobs:
           npm i -g conventional-changelog-conventionalcommits
           npm i -g commitlint@latest
           echo ${{ github.event.pull_request.title }} | npx commitlint
+      - name: Labeling
+        uses: actions/labeler@v5

Reply via email to