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 26, 2024
1 parent 504238c commit ba63d89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/code-freeze-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ jobs:
id: filter-branch
# Following grep "regex" needs to exactly match the required target branches to "freeze"
run: |
echo "target = $PR_TARGET_BRANCH"
FILTERED_BRANCH="$(echo "$PR_TARGET_BRANCH" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$')"
echo "filtered_code_freeze_branch=$FILTERED_BRANCH" >> "$GITHUB_OUTPUT"
env:
PR_TARGET_BRANCH: ${ steps.get-pr-target-branch.outputs.pr_target_branch }
PR_TARGET_BRANCH: ${{ steps.get-pr-target-branch.outputs.pr_target_branch }}

- name: Code Freeze New
if: (github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)) && steps.filter-branch.outputs.filtered_code_freeze_branch == steps.get-pr-target-branch.outputs.pr_target_branch
Expand Down

0 comments on commit ba63d89

Please sign in to comment.