name: Auto Add Issues and Pull Requests to Project

on:
  issues:
    types:
      - opened
  pull_request_target:
    types:
      - opened

jobs:
  # https://github.com/actions/add-to-project
  add-to-project:
    name: Add issue and bugs to project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/add-to-project@v0.5.0
        with:
          project-url: https://github.com/orgs/overhangio/projects/4
          github-token: ${{ secrets.GH_PROJECT_PERSONAL_ACCESS_TOKEN }}
