-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (35 loc) · 1.2 KB
/
add_issue_new_projects.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: "Add Issues To Project Board"
"on":
issues:
types:
- opened
env:
GH_TOKEN: ${{ secrets.GH_NEW_CARD_TO_PROJECT }}
PROJECT_ID: ${{ secrets.FRONT_END_PROJECT_ID }}
ISSUE_ID: ${{ github.event.issue.node_id }}
USER: ${{ github.actor }}
jobs:
add_issue_frontend:
# yamllint disable rule:line-length
runs-on: ubuntu-latest
steps:
- name: "Add to front end project board"
run: |
gh api graphql -f query='
mutation($user:String!, $project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {clientMutationId: $user, projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID -f user=$USER
- name: "Add repo identifier label"
run: |
gh api graphql -f query='
mutation($user:String!, $issue:ID!) {
addLabelsToLabelable(input: {clientMutationId: $user, labelableId: $issue, labelIds: ["LA_kwDOFDaR5872-WxC", "LA_kwDOFDaR588AAAABDzKzWQ"]}) {
clientMutationId
}
}' -f issue=$ISSUE_ID -f user=$USER
# yamllint enable rule:line-length