From 345a8f5915b6ec4ff6cca3eb1ae76cb4744ba2de Mon Sep 17 00:00:00 2001 From: Josh Black Date: Thu, 18 Apr 2024 16:43:50 -0500 Subject: [PATCH] Create add-to-inbox.yml (#1021) --- .github/workflows/add-to-inbox.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 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 000000000..ccb3b83ca --- /dev/null +++ b/.github/workflows/add-to-inbox.yml @@ -0,0 +1,33 @@ +name: Add to Inbox 📥 +on: + issues: + types: [opened, reopened] + +jobs: + add-to-inbox: + if: ${{ github.repository == 'primer/behaviors' }} + runs-on: ubuntu-latest + env: + ISSUE_URL: ${{ github.event.issue.html_url }} + PROJECT_ID: 4503 + steps: + - id: get-primer-access-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID }} + private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY }} + - name: Add labels to issue + run: | + gh issue edit $ISSUE_URL --add-label 'rails,react' + env: + GH_TOKEN: ${{ steps.get-primer-access-token.outputs.token }} + - 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 }}