Skip to content

Commit 73778f5

Browse files
committed
[skip ci] update new issues workflow
1 parent fcdaba6 commit 73778f5

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

.github/workflows/new-issues.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
1-
name: Move new/reopened issues into Triage
1+
name: Add to project
22

33
on:
44
issues:
5-
types: [opened,reopened]
5+
types: [opened,transferred]
6+
67
jobs:
7-
automate-project-columns:
8+
add-to-project:
9+
name: Add issue to project
810
runs-on: ubuntu-latest
911
steps:
10-
- uses: alex-page/[email protected]
12+
- uses: actions/add-to-project@main
13+
id: add_project
1114
with:
12-
project: Products(Extended)
13-
column: Triage
14-
repo-token: ${{ secrets.BOT_TOKEN }}
15+
project-url: ${{ secrets.PROJECT_PLANNING }}
16+
github-token: ${{ secrets.BOT_TOKEN_PROJECT }}
17+
- name: Set Team
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_PROJECT }}
20+
run: |
21+
gh api graphql -f query='
22+
mutation(
23+
$project: ID!
24+
$item: ID!
25+
$status_field: ID!
26+
$status_value: String!
27+
) {
28+
updateProjectNextItemField(
29+
input: {
30+
projectId: $project
31+
itemId: $item
32+
fieldId: $status_field
33+
value: $status_value
34+
}
35+
) {
36+
projectNextItem {
37+
id
38+
}
39+
}
40+
}' -f project=${{ secrets.PROJECT_PLANNING_ID }} -f item=${{ steps.add_project.outputs.itemId }} -f status_field=${{ secrets.PLANNING_TEAM_FIELD_ID }} -f status_value=ed46988b --silent

0 commit comments

Comments
 (0)