name: issue to project
on:
  issues:
    types: [labeled]
env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
  assign_one_project:
    runs-on: ubuntu-latest
    name: Assign to One Project
    steps:
    - name: Assign issues and with `bug` label to bugs project
      uses: srggrs/assign-one-project-github-action@1.3.1
      if: contains(github.event.issue.labels.*.name, 'bug')
      with:
        project: https://github.com/Riverside-Healthcare/djLint/projects/1
        column_name: Needs triage
    - name: Assign issues and with `enhancement` label to enhancement project
      uses: srggrs/assign-one-project-github-action@1.3.1
      if: contains(github.event.issue.labels.*.name, 'enhancement')
      with:
        project: https://github.com/Riverside-Healthcare/djLint/projects/2
        column_name: Needs triage
