forked from remix-project-org/remix-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-qa-doc.js
More file actions
49 lines (45 loc) · 1.1 KB
/
Copy pathbuild-qa-doc.js
File metadata and controls
49 lines (45 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const fs = require('fs')
let value = fs.readFileSync('./done.json')
value = JSON.parse(value)
const {nodes} = value.data.organization.projectV2.items
let data = ''
console.log(nodes.length, 'PRs\n')
data = nodes.length + ' PRs\n'
for (let node of nodes) {
if (node.content.url && node.content.merged && node.content.merged !== false) {
data += `${node.content.title} - ${node.content.url}\n`
}
}
fs.writeFileSync('./done.txt', data)
console.log('done.txt updated')
/*
- Login to Github CLI: gh auth login
- set the correct project id
- run the query (be careful, this only returns the first 100 elements)
- Copy the JSON content from CLI in done.json
- run this script
- get the result from the file done.txt
/*
gh api graphql -f query='{
organization(login: "remix-project-org") {
projectV2(number: 31) {
title
url
items(first: 100) {
totalCount
nodes {
content {
... on PullRequest {
url
id
number
title
merged
}
}
}
}
}
}
}'
*/