From 36849a1c616dfddc1d413b97e58e45e003f0bea0 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Fri, 13 Jun 2025 10:55:58 +0100 Subject: [PATCH 1/2] chore: fix bot label adding needs attention labels inappropriately --- .github/workflows/issue-labels.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/issue-labels.yaml b/.github/workflows/issue-labels.yaml index f54d69bd..88f1c993 100644 --- a/.github/workflows/issue-labels.yaml +++ b/.github/workflows/issue-labels.yaml @@ -3,6 +3,8 @@ name: Update labels on issues with OP response on: issue_comment: types: [created] + issues: + types: [opened] jobs: label-op-response: @@ -33,6 +35,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} label-new-issue: + if: github.event.action == 'opened' runs-on: ubuntu-latest steps: - name: Add 'Needs Attention' label to new issue From bdb99d7b7b3f97afc7bc22a9a2771dfded5ca415 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Fri, 13 Jun 2025 11:04:36 +0100 Subject: [PATCH 2/2] chore: add some logs to double check working --- .github/workflows/issue-labels.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/issue-labels.yaml b/.github/workflows/issue-labels.yaml index 88f1c993..b842defc 100644 --- a/.github/workflows/issue-labels.yaml +++ b/.github/workflows/issue-labels.yaml @@ -15,11 +15,18 @@ jobs: run: | OP=${{ github.event.issue.user.login }} COMMENTER=${{ github.event.comment.user.login }} + echo "OP: $OP" + echo "COMMENTER: $COMMENTER" if [ "$OP" = "$COMMENTER" ]; then echo "op_comment=true" >> $GITHUB_ENV + echo "Setting op_comment to true" else echo "op_comment=false" >> $GITHUB_ENV + echo "Setting op_comment to false" fi + - name: Debug - Print op_comment value + run: | + echo "op_comment value: ${{ env.op_comment }}" - name: Add 'Needs Attention' label if OP responded if: env.op_comment == 'true' uses: actions-ecosystem/action-add-labels@v1