rustic/.github/workflows/triage.yml
simonsan 974727b7ed
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>
2024-10-03 14:19:54 +02:00

21 lines
564 B
YAML

on:
issues:
types:
- opened
jobs:
label_issue:
if: ${{ github.repository_owner == 'rustic-rs' }}
name: Label issue
runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
run: |
# 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