This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto apply triage label and default project | |
on: | |
issues: | |
types: | |
- opened | |
- reopened | |
jobs: | |
label_and_assign_project: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
repository-projects: write # This covers classic projects; in many orgs, it also "just works" for Beta Projects | |
steps: | |
- name: Add "triage" label if no milestone | |
if: ${{ github.event.issue.milestone == null }} | |
run: gh issue edit "${{ github.repository }}#${{ github.event.issue.number }}" \ | |
--add-label "triage" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Add issue to org-level project #X | |
run: gh project item-add quantumjs/launch-track \ | |
--content-id "${{ github.event.issue.node_id }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |