File tree Expand file tree Collapse file tree 1 file changed +14
-39
lines changed Expand file tree Collapse file tree 1 file changed +14
-39
lines changed Original file line number Diff line number Diff line change 1
- name : Transfer New Issue to Docs Project
1
+ name : ' Add to DevRel Project'
2
2
3
3
on :
4
4
issues :
5
- types : [opened]
5
+ types :
6
+ - opened
7
+ - reopened
8
+ pull_request :
9
+ types :
10
+ - opened
11
+ - reopened
6
12
7
13
jobs :
8
- transfer :
14
+ add-to-project :
15
+ name : Add issue/PR to project
9
16
runs-on : ubuntu-latest
10
17
steps :
11
- - name : Transfer Issue
12
- uses : actions/github-script@v5
18
+
13
19
with :
14
- github-token : ${{secrets.GH_TOKEN}}
15
- script : |
16
- const issueTitle = context.payload.issue.title;
17
- const issueBody = context.payload.issue.body;
18
- const issueNumber = context.payload.issue.number;
19
- const organizationName = 'near';
20
- const projectName = 'NEAR Docs';
21
-
22
- // Fetch project ID and other necessary IDs
23
- const query = `
24
- query {
25
- organization(login: "${organizationName}") {
26
- projectV2(number: 117) {
27
- id
28
- }
29
- }
30
- }
31
- `;
32
-
33
- const projectIdResponse = await github.graphql(query);
34
- const projectId = projectIdResponse.organization.projectV2.id;
35
-
36
- // Add issue to the project
37
- const mutation = `
38
- mutation($projectId: ID!, $contentId: ID!) {
39
- addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) {
40
- item {
41
- id
42
- }
43
- }
44
- }
45
- `;
46
-
47
- await github.graphql(mutation, { projectId: projectId, contentId: context.payload.issue.node_id });
20
+ # add to DevRel Project #117
21
+ project-url : https://github.com/orgs/near/projects/117
22
+ github-token : ${{ secrets.GH_TOKEN }}
You can’t perform that action at this time.
0 commit comments