Files
wylab-station-14/.github/workflows/labeler-untriaged.yml
T

24 lines
717 B
YAML

name: "Labels: Untriaged"
on:
issues:
types: [opened]
pull_request_target:
types: [opened]
jobs:
add_label:
runs-on: ubuntu-latest
steps:
- name: Add untriaged label
if: github.event.issue.labels[0] == null || github.event.pull_request.labels[0] == null
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NUMBER="${{ github.event.pull_request.number || github.event.issue.number }}"
curl -sS -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"labels":["S: Untriaged"]}' \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/$NUMBER/labels"