Skip to content

Commit d797f9b

Browse files
authored
ci: add add-to-inbox workflow (#102)
1 parent d085864 commit d797f9b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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/eslint-plugin-primer-react' }}
9+
env:
10+
ISSUE_URL: ${{ github.event.issue.html_url }}
11+
PROJECT_ID: 4503
12+
steps:
13+
- id: get-primer-access-token
14+
uses: actions/create-github-app-token@v1
15+
with:
16+
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID }}
17+
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY }}
18+
- name: Add react label to issue
19+
run: |
20+
gh issue edit $ISSUE_URL --add-label react
21+
env:
22+
GH_TOKEN: ${{ steps.get-primer-access-token.outputs.token }}
23+
- id: get-github-access-token
24+
uses: actions/create-github-app-token@v1
25+
with:
26+
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID_FOR_GITHUB }}
27+
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY_FOR_GITHUB }}
28+
- name: Add issue to project
29+
run: gh project item-add $PROJECT_ID --url $ISSUE_URL --owner github
30+
env:
31+
GH_TOKEN: ${{ steps.get-github-access-token.outputs.token }}

0 commit comments

Comments
 (0)