From e5d5cae6ae00f03173da9b0ee8545b0147fa2704 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Tue, 4 Jul 2023 03:39:21 -0500 Subject: [PATCH] create two pr-label-manager's --- .../workflows/pr-label-manager--on-label.yaml | 14 +++++++++ .../workflows/pr-label-manager--on-open.yaml | 18 ++++++++++++ .github/workflows/pr-label-manager.yaml | 29 ------------------- 3 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/pr-label-manager--on-label.yaml create mode 100644 .github/workflows/pr-label-manager--on-open.yaml delete mode 100644 .github/workflows/pr-label-manager.yaml diff --git a/.github/workflows/pr-label-manager--on-label.yaml b/.github/workflows/pr-label-manager--on-label.yaml new file mode 100644 index 000000000..37f16aa00 --- /dev/null +++ b/.github/workflows/pr-label-manager--on-label.yaml @@ -0,0 +1,14 @@ +name: PR Label Manager (on Label) +on: + pull_request: + types: + - labeled + - unlabeled + push: + paths: + - '.github/workflows/pr-label*.yaml' + +jobs: + check_labels: + needs: [pr_labeler] + uses: ./.github/workflows/pr-label-checker.yaml diff --git a/.github/workflows/pr-label-manager--on-open.yaml b/.github/workflows/pr-label-manager--on-open.yaml new file mode 100644 index 000000000..6cd0d19a3 --- /dev/null +++ b/.github/workflows/pr-label-manager--on-open.yaml @@ -0,0 +1,18 @@ +name: PR Label Manager (on Open) +on: + pull_request: + types: + - opened + - reopened # for testing + push: + paths: + - '.github/workflows/pr-label*.yaml' + +jobs: + pr_labeler: + uses: ./.github/workflows/pr-labeler.yaml + + check_labels: + name: Check Labels + needs: [pr_labeler] + uses: ./.github/workflows/pr-label-checker.yaml diff --git a/.github/workflows/pr-label-manager.yaml b/.github/workflows/pr-label-manager.yaml deleted file mode 100644 index 5a4c3481f..000000000 --- a/.github/workflows/pr-label-manager.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: PR Labeler -on: - pull_request: - types: - - opened - - reopened # for testing - - labeled - - unlabeled - push: - paths: - - '.github/workflows/pr-label*.yaml' - -permissions: - contents: read - -jobs: - pr_labeler: - name: Label PR - if: | - github.event.pull_request.type == 'opened' || - github.event.pull_request.type == 'reopened' - uses: ./.github/workflows/pr-labeler.yaml - - check_labels: - if: | - github.event.pull_request.type == 'labeled' || - github.event.pull_request.type == 'unlabeled' - needs: [pr_labeler] - uses: ./.github/workflows/pr-label-checker.yaml