We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21649a6 commit b67f9a6Copy full SHA for b67f9a6
.github/workflows/add-issues-to-engineering-project.yml
@@ -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