Skip to content

Instantly share code, notes, and snippets.

@TWinsnes
Created April 18, 2020 06:22
Show Gist options
  • Save TWinsnes/ff11fa2a38b6ebc18db2f00ce1feadba to your computer and use it in GitHub Desktop.
Save TWinsnes/ff11fa2a38b6ebc18db2f00ce1feadba to your computer and use it in GitHub Desktop.
Get all commits in a time period for a repository in GitHub using GraphQL
query {
# replace owner name and name of the repositort to scan
repository(owner: "twinsnes", name: "<repo name>"){
name,
refs(refPrefix: "refs/heads/", first: 100){
totalCount,
nodes {
target {
... on Commit {
# replace dates
history(since:"2018-06-30T23:59:59", until: "2019-07-01T00:00:00"){
nodes {
... on Commit {
message,
authoredDate,
author{
name
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment