From 974727b7ed5d83b46f08d9b1f5723d071dd14269 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:19:54 +0200 Subject: [PATCH] ci: add triage label to new issues only if no label has been set when creating it (#1287) Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- .github/workflows/triage.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 11b4855d2..0204f618d 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -13,4 +13,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE_URL: ${{ github.event.issue.html_url }} run: | - gh issue edit $ISSUE_URL --add-label "S-triage" + # check if issue doesn't have any labels + if [[ $(gh issue view $ISSUE_URL --json labels -q '.labels | length') -eq 0 ]]; then + # add S-triage label + gh issue edit $ISSUE_URL --add-label "S-triage" + fi