Skip to content

Instantly share code, notes, and snippets.

@Quramy
Created September 22, 2017 02:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Quramy/cbde7330111e995baf3d22643b02afe9 to your computer and use it in GitHub Desktop.
Save Quramy/cbde7330111e995baf3d22643b02afe9 to your computer and use it in GitHub Desktop.
get commit id from tagname
{
"owner": "Quramy",
"repository": "tsuquyomi",
"tag": "v0.8.0"
}
query MyQuery($tag: String!, $owner: String!, $repository: String!) {
repository(owner: $owner, name: $repository) {
nameWithOwner
ref(qualifiedName: $tag) {
name
target {
oid
}
}
}
}
@Quramy
Copy link
Author

Quramy commented Sep 22, 2017

sample result:

{
  "data": {
    "repository": {
      "nameWithOwner": "Quramy/tsuquyomi",
      "ref": {
        "name": "v0.8.0",
        "target": {
          "oid": "254f890f2f216a5179d8612f8a2b6fa15ca461ab"
        }
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment