From 6c9801f21ebb159e6dc73ab1a9ef6d12be3ef503 Mon Sep 17 00:00:00 2001 From: "Kenta Goto (k.goto)" <24818752+go-to-k@users.noreply.github.com> Date: Sun, 18 Aug 2024 21:58:07 +0900 Subject: [PATCH] ci: ignore lint on tagpr PR (#392) * ci: ignore lint on tagpr PR * ignoreLabels --- .github/workflows/semantic-pull-request.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 10c1079f..786bd1f8 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -40,6 +40,8 @@ jobs: version client requireScope: false + ignoreLabels: | + tagpr label: name: Manage labels @@ -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"