How to get all the commit messages along with userid and patches for all repositories for an organization on...
up vote
0
down vote
favorite
I need to find all the commit messages and the corresponding patches of code using GraphQL. Doing so from Rest API v3 was very easy, however I am not really understanding how to get around GitHub's GraphQL API v4. I started with GraphQL just a couple of days ago. GitHub's docs seem very cryptic. Especially implements
, nodes
and edges
, target
and GitObjects
, pagination
and cursor
.
So far I have the following, but instead of giving me the list of commits for all repos I get one commit for a certain number of repos -
Query:
query list_commits ($repo: String!){
rateLimit{
cost
remaining
}
organization(login: $repo){
repositories(first: 30) {
edges{
node{
defaultBranchRef{
repository{
name
}
target {
... on Commit{
message
}
}
}
}
}
}
}
}
Query Variable:
{
"repo": "elastic"
}
Part of the response:
{
"data": {
"rateLimit": {
"cost": 1,
"remaining": 4999
},
"organization": {
"repositories": {
"edges": [
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch"
},
"target": {
"message": "Small corrections to HLRC doc for _termvectors (#35221)nnRelates to #33447"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-servicewrapper"
},
"target": {
"message": "Update README.md"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-net"
},
"target": {
"message": "Update Projects static initializing even further, unit tests all pass now"
}
}
}
},
I am okay with taking small steps first like getting all the commits for a single repository and then expanding it for all repos in an organization.
git graphql git-commit
add a comment |
up vote
0
down vote
favorite
I need to find all the commit messages and the corresponding patches of code using GraphQL. Doing so from Rest API v3 was very easy, however I am not really understanding how to get around GitHub's GraphQL API v4. I started with GraphQL just a couple of days ago. GitHub's docs seem very cryptic. Especially implements
, nodes
and edges
, target
and GitObjects
, pagination
and cursor
.
So far I have the following, but instead of giving me the list of commits for all repos I get one commit for a certain number of repos -
Query:
query list_commits ($repo: String!){
rateLimit{
cost
remaining
}
organization(login: $repo){
repositories(first: 30) {
edges{
node{
defaultBranchRef{
repository{
name
}
target {
... on Commit{
message
}
}
}
}
}
}
}
}
Query Variable:
{
"repo": "elastic"
}
Part of the response:
{
"data": {
"rateLimit": {
"cost": 1,
"remaining": 4999
},
"organization": {
"repositories": {
"edges": [
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch"
},
"target": {
"message": "Small corrections to HLRC doc for _termvectors (#35221)nnRelates to #33447"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-servicewrapper"
},
"target": {
"message": "Update README.md"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-net"
},
"target": {
"message": "Update Projects static initializing even further, unit tests all pass now"
}
}
}
},
I am okay with taking small steps first like getting all the commits for a single repository and then expanding it for all repos in an organization.
git graphql git-commit
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to find all the commit messages and the corresponding patches of code using GraphQL. Doing so from Rest API v3 was very easy, however I am not really understanding how to get around GitHub's GraphQL API v4. I started with GraphQL just a couple of days ago. GitHub's docs seem very cryptic. Especially implements
, nodes
and edges
, target
and GitObjects
, pagination
and cursor
.
So far I have the following, but instead of giving me the list of commits for all repos I get one commit for a certain number of repos -
Query:
query list_commits ($repo: String!){
rateLimit{
cost
remaining
}
organization(login: $repo){
repositories(first: 30) {
edges{
node{
defaultBranchRef{
repository{
name
}
target {
... on Commit{
message
}
}
}
}
}
}
}
}
Query Variable:
{
"repo": "elastic"
}
Part of the response:
{
"data": {
"rateLimit": {
"cost": 1,
"remaining": 4999
},
"organization": {
"repositories": {
"edges": [
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch"
},
"target": {
"message": "Small corrections to HLRC doc for _termvectors (#35221)nnRelates to #33447"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-servicewrapper"
},
"target": {
"message": "Update README.md"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-net"
},
"target": {
"message": "Update Projects static initializing even further, unit tests all pass now"
}
}
}
},
I am okay with taking small steps first like getting all the commits for a single repository and then expanding it for all repos in an organization.
git graphql git-commit
I need to find all the commit messages and the corresponding patches of code using GraphQL. Doing so from Rest API v3 was very easy, however I am not really understanding how to get around GitHub's GraphQL API v4. I started with GraphQL just a couple of days ago. GitHub's docs seem very cryptic. Especially implements
, nodes
and edges
, target
and GitObjects
, pagination
and cursor
.
So far I have the following, but instead of giving me the list of commits for all repos I get one commit for a certain number of repos -
Query:
query list_commits ($repo: String!){
rateLimit{
cost
remaining
}
organization(login: $repo){
repositories(first: 30) {
edges{
node{
defaultBranchRef{
repository{
name
}
target {
... on Commit{
message
}
}
}
}
}
}
}
}
Query Variable:
{
"repo": "elastic"
}
Part of the response:
{
"data": {
"rateLimit": {
"cost": 1,
"remaining": 4999
},
"organization": {
"repositories": {
"edges": [
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch"
},
"target": {
"message": "Small corrections to HLRC doc for _termvectors (#35221)nnRelates to #33447"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-servicewrapper"
},
"target": {
"message": "Update README.md"
}
}
}
},
{
"node": {
"defaultBranchRef": {
"repository": {
"name": "elasticsearch-net"
},
"target": {
"message": "Update Projects static initializing even further, unit tests all pass now"
}
}
}
},
I am okay with taking small steps first like getting all the commits for a single repository and then expanding it for all repos in an organization.
git graphql git-commit
git graphql git-commit
asked Nov 5 at 7:05
raj
572318
572318
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53149756%2fhow-to-get-all-the-commit-messages-along-with-userid-and-patches-for-all-reposit%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password