You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/03/31 11:02:15 UTC

[camel] 02/02: (chores) ci: make the labeler effective for any scope of change

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2ba5ea35135a72759ceb4d31cbe61c00105b2ddc
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 31 13:01:09 2022 +0200

    (chores) ci: make the labeler effective for any scope of change
---
 .github/workflows/component-pr.yaml                | 14 --------------
 .../{component-pr.yaml => generic-pr.yaml}         | 22 +++-------------------
 .../{component-pr => generic-pr}/label-config.yml  |  0
 3 files changed, 3 insertions(+), 33 deletions(-)

diff --git a/.github/workflows/component-pr.yaml b/.github/workflows/component-pr.yaml
index f5c4c17..730df2a 100644
--- a/.github/workflows/component-pr.yaml
+++ b/.github/workflows/component-pr.yaml
@@ -30,11 +30,7 @@ jobs:
     name: Process
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
       - uses: actions/github-script@v6
-        env:
-          RESULT: ${{ steps.quick-test.outputs.result }}
-          COUNT: ${{ steps.quick-test.outputs.count }}
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
@@ -46,13 +42,3 @@ jobs:
               repo: context.repo.repo,
               body: `This PR changes components and will be tested automatically`
             })
-      - name: Label changes scope
-        if: |
-          github.event_name == 'pull_request_target' &&
-            (github.event.action == 'opened' ||
-             github.event.action == 'synchronize')
-        uses: actions/labeler@2.2.0
-        with:
-          repo-token: ${{ secrets.GITHUB_TOKEN }}
-          configuration-path: .github/workflows/component-pr/label-config.yml
-          sync-labels: true
diff --git a/.github/workflows/component-pr.yaml b/.github/workflows/generic-pr.yaml
similarity index 63%
copy from .github/workflows/component-pr.yaml
copy to .github/workflows/generic-pr.yaml
index f5c4c17..04ff5565 100644
--- a/.github/workflows/component-pr.yaml
+++ b/.github/workflows/generic-pr.yaml
@@ -22,37 +22,21 @@ on:
     types:
       - opened
       - reopened
-    paths:
-      - 'components/**'
+      - synchronize
 
 jobs:
   process:
     name: Process
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
-      - uses: actions/github-script@v6
-        env:
-          RESULT: ${{ steps.quick-test.outputs.result }}
-          COUNT: ${{ steps.quick-test.outputs.count }}
-        with:
-          github-token: ${{ secrets.GITHUB_TOKEN }}
-          script: |
-            const { RESULT, COUNT } = process.env
-            
-            github.rest.issues.createComment({
-              issue_number: context.issue.number,
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              body: `This PR changes components and will be tested automatically`
-            })
       - name: Label changes scope
         if: |
           github.event_name == 'pull_request_target' &&
             (github.event.action == 'opened' ||
+             github.event.action == 'reopened' ||
              github.event.action == 'synchronize')
         uses: actions/labeler@2.2.0
         with:
           repo-token: ${{ secrets.GITHUB_TOKEN }}
-          configuration-path: .github/workflows/component-pr/label-config.yml
+          configuration-path: .github/workflows/generic-pr/label-config.yml
           sync-labels: true
diff --git a/.github/workflows/component-pr/label-config.yml b/.github/workflows/generic-pr/label-config.yml
similarity index 100%
rename from .github/workflows/component-pr/label-config.yml
rename to .github/workflows/generic-pr/label-config.yml