Skip to content

Commit 41867eb

Browse files
fix: update issue-transfer.yml
1 parent 578ad9a commit 41867eb

File tree

1 file changed

+14
-39
lines changed

1 file changed

+14
-39
lines changed

.github/workflows/issue-transfer.yml

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,22 @@
1-
name: Transfer New Issue to Docs Project
1+
name: 'Add to DevRel Project'
22

33
on:
44
issues:
5-
types: [opened]
5+
types:
6+
- opened
7+
- reopened
8+
pull_request:
9+
types:
10+
- opened
11+
- reopened
612

713
jobs:
8-
transfer:
14+
add-to-project:
15+
name: Add issue/PR to project
916
runs-on: ubuntu-latest
1017
steps:
11-
- name: Transfer Issue
12-
uses: actions/github-script@v5
18+
- uses: actions/[email protected]
1319
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 }}

0 commit comments

Comments
 (0)