Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save t-yamamoto-mercury-inc/0bdd1be4551b97b4a24376ec4f52f4d3 to your computer and use it in GitHub Desktop.
Save t-yamamoto-mercury-inc/0bdd1be4551b97b4a24376ec4f52f4d3 to your computer and use it in GitHub Desktop.
github.comのorganizationのprojectのcard(issue)の一覧を取得する方法
https://docs.github.com/en/free-pro-team@latest/graphql/overview/explorer
https://developer.github.com/v4/explorer/
{
organization(login: "mercury-inc-cc") {
projects(first: 20) {
nodes {
name
columns (first: 20) {
nodes {
name
cards(first: 100) {
nodes {
content {
... on Issue {
title
url
assignees(first:5) {
edges {
node {
login
}
}
}
# labels(first:5) {
# edges {
# node {
# name
# }
# }
# }
}
}
}
}
}
}
}
}
}
}
tee a.txt
grep -e name -e title -e name -e url -e login a.txt | sed -e 's/"name": "/"/g' -e 's/"title": "//g' -e 's|"url": "https://github.com/mercury-inc-cc/| |g' -e 's|/issues/| #|g' -e 's/"login": "/ /g' -e 's/_ //g' -e 's/"//g' -e 's/,//g' -e 's/ //g' | sed -e 's/-mecury-inc-cc//g' -e 's/-mercury-inc//g' | gsed -z 's/\n / /g' > b.txt
# brew install gnu-sed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment