Skip to content

Instantly share code, notes, and snippets.

@FujiHaruka
Created May 11, 2019 10:57
Show Gist options
  • Select an option

  • Save FujiHaruka/f6776a2fe8f034927d2714f72f505bb9 to your computer and use it in GitHub Desktop.

Select an option

Save FujiHaruka/f6776a2fe8f034927d2714f72f505bb9 to your computer and use it in GitHub Desktop.
GraphQL query to get latest commit hash of a file
{
repository(name: "TypeScript", owner: "Microsoft") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(first: 1, path: "tslint.json") {
edges {
node {
oid
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment