From 8d01ec02a6c6c7912baf5d4617a4b06545b135b8 Mon Sep 17 00:00:00 2001 From: dbasunag Date: Mon, 14 Apr 2025 18:31:03 -0400 Subject: [PATCH] Fix add-remove-labels workflow --- .github/workflows/add-remove-labels.yml | 12 +++++------- .github/workflows/scripts/pr_workflow.py | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/add-remove-labels.yml b/.github/workflows/add-remove-labels.yml index 36077567b..487b5e6f4 100644 --- a/.github/workflows/add-remove-labels.yml +++ b/.github/workflows/add-remove-labels.yml @@ -3,12 +3,6 @@ on: pull_request_target: types: [synchronize] - pull_request_review: - types: [submitted, edited] - - pull_request_review_comment: - types: [created, edited] - issue_comment: types: [created, edited, deleted] @@ -19,7 +13,7 @@ permissions: issues: write jobs: - add-remove-labels: + add-remove-labels-reactions: if: | contains(github.event.comment.body, '/wip') || contains(github.event.comment.body, '/verified') || @@ -36,6 +30,10 @@ jobs: comment-id: ${{ github.event.comment.id }} reactions: '+1' + add-remove-labels: + runs-on: ubuntu-latest + + steps: - uses: actions/checkout@v4 - name: Install uv diff --git a/.github/workflows/scripts/pr_workflow.py b/.github/workflows/scripts/pr_workflow.py index 5102fcace..a5dd6634f 100644 --- a/.github/workflows/scripts/pr_workflow.py +++ b/.github/workflows/scripts/pr_workflow.py @@ -250,6 +250,7 @@ def add_remove_pr_labels(self) -> None: # We will only reach here if the PR was created from a fork elif self.event_name == "workflow_run" and self.event_action == "submitted": self.pull_request_review_label_actions() + return LOGGER.warning("`add_remove_pr_label` called without a supported event")