Skip to content

Commit

Permalink
Update code-freeze.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ajberdy authored Nov 22, 2023
1 parent ee7b214 commit bb0c000
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/code-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ jobs:
echo $BRANCH_NAME
echo $PR_TITLE
# if it's not a critical fix
if ! [[ "$PR_TITLE" == fix\(critical\):* ]]; then
if [[ -z $UNFROZEN_PREFIX ]];
then
echo "Error: You can only merge PRs titled with prefix 'fix(critical): '."
else
# and there's an unfrozen prefix
if ! [[ -z $UNFROZEN_PREFIX ]]; then
# check if the branch matches unfrozen prefix
if [[ "$BRANCH_NAME" != $UNFROZEN_PREFIX* ]]; then
echo "Error: You can only merge from branches that start with '$UNFROZEN_PREFIX', or PRs titled with prefix 'fix(critical): '."
fi
# repo is fully frozen
else
echo "Error: You can only merge PRs titled with prefix 'fix(critical): '."
fi
fi

0 comments on commit bb0c000

Please sign in to comment.