From f100c7f4fdbfa63a479ca7d665e4b8791f5e6650 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 1 Nov 2023 10:09:54 -0500 Subject: [PATCH] Create add-to-inbox.yml (#673) * Create add-to-inbox.yml * Update add-to-inbox.yml --- .github/workflows/add-to-inbox.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/add-to-inbox.yml diff --git a/.github/workflows/add-to-inbox.yml b/.github/workflows/add-to-inbox.yml new file mode 100644 index 00000000..d2d9c8f0 --- /dev/null +++ b/.github/workflows/add-to-inbox.yml @@ -0,0 +1,25 @@ +name: Add to Inbox 📥 +on: + issues: + types: [opened, reopened] + +jobs: + add-to-inbox: + if: ${{ github.repository == 'primer/doctocat' }} + runs-on: ubuntu-latest + env: + ISSUE_URL: ${{ github.event.issue.html_url }} + PROJECT_ID: 4503 + steps: + - name: Add labels to issue + run: gh issue edit $ISSUE_URL --add-label 'react' + - id: get-github-access-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID_FOR_GITHUB }} + private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY_FOR_GITHUB }} + owner: github + - name: Add issue to project + run: gh project item-add $PROJECT_ID --url $ISSUE_URL --owner github + env: + GH_TOKEN: ${{ steps.get-github-access-token.outputs.token }}