From 3bc876507023c0e2b68c388826d955186ef34cd1 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Mon, 29 Apr 2024 16:18:59 +0100 Subject: [PATCH] Update code freeze bot to check target PR branch correctly for issue_comment Signed-off-by: Andrew Leonard --- .github/workflows/code-freeze-new.yml | 4 ++-- .github/workflows/code-freeze-regex-branch.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-freeze-new.yml b/.github/workflows/code-freeze-new.yml index 67552ee98..6615c0caf 100644 --- a/.github/workflows/code-freeze-new.yml +++ b/.github/workflows/code-freeze-new.yml @@ -38,9 +38,9 @@ jobs: steps: - name: print run: | - echo "MATCH ? $MATCHES" + echo "MATCH ? $MATCHES LL ${{ needs.codefreeze_branch_check.outputs.regex-matches }}" env: - MATCHES: ${{ needs.codefreeze_branch_check.outputs.regex-matches }} + MATCHES: ${{ needs.codefreeze_branch_check.outputs.regex-matches }} #codefreeze_if_branch_match: # needs: codefreeze_branch_check diff --git a/.github/workflows/code-freeze-regex-branch.yml b/.github/workflows/code-freeze-regex-branch.yml index 644d7c747..6f750587b 100644 --- a/.github/workflows/code-freeze-regex-branch.yml +++ b/.github/workflows/code-freeze-regex-branch.yml @@ -24,7 +24,7 @@ on: outputs: regex-matches: description: "Whether the pull request target branch matches the input branch-regex" - value: ${{ jobs.check-freeze-branch.outputs.code_freeze_branch }} + value: ${{ jobs.codefreeze_branch_check.outputs.regex-matches }} permissions: contents: write @@ -33,6 +33,8 @@ permissions: jobs: codefreeze_branch_check: runs-on: ubuntu-latest + outputs: + regex-matches: ${{ steps.check-freeze-branch.outputs.code_freeze_branch }} steps: - name: Get pull request target branch if: github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)