-
Notifications
You must be signed in to change notification settings - Fork 33
42 lines (40 loc) · 1.2 KB
/
new-issues.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
39
40
41
42
name: Add to project
on:
issues:
types: [opened,transferred]
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
id: add_project
with:
project-url: ${{ secrets.PROJECT_PLANNING }}
github-token: ${{ secrets.BOT_TOKEN_PROJECT }}
- name: Set Team
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_PROJECT }}
run: |
gh api graphql -f query='
mutation(
$project: ID!
$item: ID!
$status_field: ID!
$status_value: String!
) {
updateProjectV2ItemFieldValue(
input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: {
singleSelectOptionId: $status_value
}
}
) {
projectV2Item {
id
}
}
}' -f project=${{ secrets.PROJECT_PLANNING_ID }} -f item=${{ steps.add_project.outputs.itemId }} -f status_field=${{ secrets.PLANNING_TEAM_FIELD_ID }} -f status_value=620890b9 --silent