Skip to content

Commit 6ed742f

Browse files
authored
Merge pull request #239 from primer/lcw/createAddToInboxWorkflow
Create workflow to add primer/behaviors issues to the Primer teams backlog for triage
2 parents 0af3d6a + 60cc137 commit 6ed742f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/add-to-inbox.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Add to Inbox 📥
2+
on:
3+
issues:
4+
types: [opened, reopened]
5+
6+
jobs:
7+
add-to-inbox:
8+
if: ${{ github.repository == 'primer/behaviors' }}
9+
runs-on: ubuntu-latest
10+
env:
11+
ISSUE_URL: ${{ github.event.issue.html_url }}
12+
PROJECT_ID: 4503
13+
steps:
14+
- id: get-primer-access-token
15+
uses: actions/create-github-app-token@v1
16+
with:
17+
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID }}
18+
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY }}
19+
- name: Add labels to issue
20+
run: |
21+
gh issue edit $ISSUE_URL --add-label 'rails,react'
22+
env:
23+
GH_TOKEN: ${{ steps.get-primer-access-token.outputs.token }}
24+
- id: get-github-access-token
25+
uses: actions/create-github-app-token@v1
26+
with:
27+
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID_FOR_GITHUB }}
28+
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY_FOR_GITHUB }}
29+
owner: github
30+
- name: Add issue to project
31+
run: gh project item-add $PROJECT_ID --url $ISSUE_URL --owner github
32+
env:
33+
GH_TOKEN: ${{ steps.get-github-access-token.outputs.token }}

0 commit comments

Comments
 (0)