Skip to content

Commit

Permalink
ci: ignore lint on tagpr PR (#392)
Browse files Browse the repository at this point in the history
* ci: ignore lint on tagpr PR

* ignoreLabels
  • Loading branch information
go-to-k authored Aug 18, 2024
1 parent f7e6e01 commit 6c9801f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
version
client
requireScope: false
ignoreLabels: |
tagpr
label:
name: Manage labels
Expand Down Expand Up @@ -77,10 +79,15 @@ jobs:
LABELS=$(gh pr view $PR_NUMBER --json labels --jq '.labels[].name')
TAGPR_LABEL=$(echo "$LABELS" | grep -qx "tagpr" && echo "true" || echo "false")
HAS_MINOR_LABEL=$(echo "$LABELS" | grep -qx "$MINOR_LABEL" && echo "true" || echo "false")
HAS_MAJOR_LABEL=$(echo "$LABELS" | grep -qx "$MAJOR_LABEL" && echo "true" || echo "false")
HAS_PATCH_LABEL=$(echo "$LABELS" | grep -qx "$PATCH_LABEL" && echo "true" || echo "false")
if [ "$TAGPR_LABEL" = "true" ]; then
exit 0
fi
if [ "$HAS_MAJOR_LABEL" = "true" ]; then
if [ "$HAS_PATCH_LABEL" = "true" ];then
gh pr edit $PR_NUMBER --remove-label "$PATCH_LABEL"
Expand Down

0 comments on commit 6c9801f

Please sign in to comment.