Skip to content

Commit

Permalink
ci: tweak for semantic-pull-request workflow (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k authored Aug 18, 2024
1 parent 27691f2 commit c6a893f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,28 @@ jobs:
HAS_MAJOR_LABEL=$(echo "$LABELS" | grep -q "$MAJOR_LABEL" && echo "true" || echo "false")
HAS_PATCH_LABEL=$(echo "$LABELS" | grep -q "$PATCH_LABEL" && echo "true" || echo "false")
if [ "$HAS_MAJOR_LABEL" == "true" ]; then
if [ "$HAS_PATCH_LABEL" == "true" ];then
if [ "$HAS_MAJOR_LABEL" = "true" ]; then
if [ "$HAS_PATCH_LABEL" = "true" ];then
gh pr edit $PR_NUMBER --remove-label "$PATCH_LABEL"
fi
if [ "$HAS_MINOR_LABEL" == "true" ];then
if [ "$HAS_MINOR_LABEL" = "true" ];then
gh pr edit $PR_NUMBER --remove-label "$MINOR_LABEL"
fi
exit 0
fi
if [[ $TITLE =~ ^feat.* ]]; then
if [ "$HAS_MINOR_LABEL" == "false" ];then
if [ "$HAS_MINOR_LABEL" = "false" ];then
gh pr edit $PR_NUMBER --add-label "$MINOR_LABEL"
fi
if [ "$HAS_PATCH_LABEL" == "true" ];then
if [ "$HAS_PATCH_LABEL" = "true" ];then
gh pr edit $PR_NUMBER --remove-label "$PATCH_LABEL"
fi
else
if [ "$HAS_PATCH_LABEL" == "false" ];then
if [ "$HAS_PATCH_LABEL" = "false" ];then
gh pr edit $PR_NUMBER --add-label "$PATCH_LABEL"
fi
if [ "$HAS_MINOR_LABEL" == "true" ];then
if [ "$HAS_MINOR_LABEL" = "true" ];then
gh pr edit $PR_NUMBER --remove-label "$MINOR_LABEL"
fi
fi

0 comments on commit c6a893f

Please sign in to comment.