You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2024/02/08 06:39:39 UTC

(superset) branch label-issue-closing-PRs updated: now runs jobs based on an expanded field of triggers

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

rusackas pushed a commit to branch label-issue-closing-PRs
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/label-issue-closing-PRs by this push:
     new df60c51676 now runs jobs based on an expanded field of triggers
df60c51676 is described below

commit df60c51676cabdf649ce90a229c28d3d3d30a107
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Wed Feb 7 23:39:31 2024 -0700

    now runs jobs based on an expanded field of triggers
---
 .github/workflows/labeler.yml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 7590c99d9b..442fadced2 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -1,8 +1,7 @@
 name: "Pull Request Labeler"
 on:
-  pull_request_target:
-    types: [opened, reopened, synchronize]
-
+  pull_request:
+    types: [opened, reopened, synchronize, edited]
 # cancel previous workflow jobs for PRs
 concurrency:
   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -12,6 +11,8 @@ concurrency:
 jobs:
   config:
     runs-on: "ubuntu-latest"
+    # no need to run this on PR descriptn changes (edited)
+    if: ${{ github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize' }}
     outputs:
       has-secrets: ${{ steps.check.outputs.has-secrets }}
     steps:
@@ -40,6 +41,8 @@ jobs:
     #     echo "Running translation scripts"
     #     # Generate .pot -> .po -> .json files
 
+  # This'll look at the PR body and add a label if it contains an issue-closing keyword
+  # it runs on every PR event, including "edited" since people tend to add "closes #123" in the PR body after opening it
   label-auto-closing:
     needs: config
     if: needs.config.outputs.has-secrets