Skip to content

Commit b67f9a6

Browse files
committed
chore: Add workflow to add new issues to engineering project (#124)
1 parent 21649a6 commit b67f9a6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Add New Issue to Engineering Project
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
add_issue_to_project:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Add issue to project
12+
uses: actions/github-script@v7
13+
with:
14+
github-token: ${{ secrets.GH_TOKEN_ADD_TO_ENG_PROJECT }}
15+
script: |
16+
const issueId = context.payload.issue.node_id;
17+
const projectId = '22';
18+
19+
const mutation = `
20+
mutation {
21+
addProjectV2ItemById(input: {
22+
projectId: "${projectId}",
23+
contentId: "${issueId}"
24+
}) {
25+
item {
26+
id
27+
}
28+
}
29+
}
30+
`;
31+
32+
await github.graphql(mutation);

0 commit comments

Comments
 (0)