Skip to content
name: Auto apply triage label and add to project
on:
issues:
types:
- opened
- reopened
jobs:
label_and_assign_project:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read # Use this instead of 'project'
steps:
- name: Test GITHUB_TOKEN permissions
run: |
gh auth status
gh project view 1 --org quantumjs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add "triage" label if no milestone
if: ${{ github.event.issue.milestone == null }}
run: |
gh issue edit ${{ github.event.issue.number }} \
--repo quantumjs/launch-track \
--add-label triage
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add issue to project
uses: actions/add-to-project@v1.0.0
with:
project-url: https://github.com/orgs/quantumjs/projects/1
github-token: ${{ secrets.GITHUB_TOKEN }}