diff --git a/.github/workflows/add_to_project.yml b/.github/workflows/add_to_project.yml new file mode 100644 index 0000000..6ae2570 --- /dev/null +++ b/.github/workflows/add_to_project.yml @@ -0,0 +1,25 @@ +name: "Add PR to project board" +on: + pull_request_target: + types: + - opened + +env: + PR_URL: ${{ github.event.pull_request.html_url }} + +jobs: + title-check: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PEM }} + + - name: Add PR to project + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + gh project item-add --owner Submitty 1 --url "$PR_URL"