Add new workflow to label prs with needs_triage (#1045)

This commit is contained in:
Hannah DeFazio
2025-12-18 04:21:05 -05:00
committed by GitHub
parent 1c16a2d2b5
commit 9cfa9038fc

27
.github/workflows/label-new-prs.yaml vendored Normal file
View File

@@ -0,0 +1,27 @@
---
name: label new prs
on:
pull_request_target:
types:
- opened
- reopened
- converted_to_draft
- ready_for_review
jobs:
add_label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Add 'needs_triage' label if the pr is not a draft
uses: actions-ecosystem/action-add-labels@v1
if: github.event.pull_request.draft == false
with:
labels: needs_triage
- name: Remove 'needs_triage' label if the pr is a draft
uses: actions-ecosystem/action-remove-labels@v1
if: github.event.pull_request.draft == true
with:
labels: needs_triage