Skip to content

Commit 05ce6e9

Browse files
authored
Create add-to-ecosystem-project.yml (#303)
1 parent 02e9a7f commit 05ce6e9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Add to Project
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
jobs:
7+
add_to_project:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: octokit/[email protected]
11+
id: add_to_project
12+
with:
13+
headers: '{"GraphQL-Features": "projects_next_graphql"}'
14+
query: |
15+
mutation add_to_project($projectid:ID!,$contentid:ID!) {
16+
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
17+
projectNextItem {
18+
id
19+
}
20+
}
21+
}
22+
projectid: ${{ env.PROJECT_ID }}
23+
contentid: ${{ github.event.issue.node_id }}
24+
env:
25+
PROJECT_ID: "PN_kwDOAGc3Zs4ABFUO"
26+
GITHUB_TOKEN: ${{ secrets.ECOSYSTEM_USER_TOKEN }}
27+
- uses: octokit/[email protected]
28+
id: label_team
29+
with:
30+
query: |
31+
mutation add_label($issueid:ID!, $labelids:[ID!]!) {
32+
addLabelsToLabelable(input: {labelableId: $issueid, labelIds: $labelids}) {
33+
clientMutationId
34+
}
35+
}
36+
issueid: ${{ github.event.issue.node_id }}
37+
labelids: "LA_kwDOEBH20c7PrEba"
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.ECOSYSTEM_USER_TOKEN }}

0 commit comments

Comments
 (0)