Skip to content

Commit

Permalink
Update code freeze bot to check target PR branch correctly for issue_…
Browse files Browse the repository at this point in the history
…comment

Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Apr 25, 2024
1 parent 95d681c commit 347e784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-freeze-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Get pull request target branch
id: get-pr-target-branch
if: github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)
run: echo "pr_target_branch=$(gh pr view $PR_NUMBER --repo $REPOSITORY --json baseRefName --jq '.baseRefName')" >> $GITHUB_OUTPUT
run: echo "pr_target_branch=$("gh pr view $PR_NUMBER --repo $REPOSITORY --json baseRefName --jq '.baseRefName'")" >> $GITHUB_OUTPUT
env:
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.issue.number }}
Expand All @@ -42,7 +42,7 @@ jobs:
id: filter-branch
if: github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)
# Following grep "regex" needs to exactly match the required target branches to "freeze"
run: echo "filtered_code_freeze_branch=$(echo $PR_TARGET_BRANCH | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$')" >> $GITHUB_OUTPUT
run: echo "filtered_code_freeze_branch=$("echo $PR_TARGET_BRANCH | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$'")" >> $GITHUB_OUTPUT
env:
PR_TARGET_BRANCH: $${{ steps.get-pr-target-branch.outputs.pr_target_branch }}

Expand Down

0 comments on commit 347e784

Please sign in to comment.