about summary refs log tree commit diff
path: root/src/commit_pr.graphql
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit_pr.graphql')
-rw-r--r--src/commit_pr.graphql19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/commit_pr.graphql b/src/commit_pr.graphql
new file mode 100644
index 0000000..b231038
--- /dev/null
+++ b/src/commit_pr.graphql
@@ -0,0 +1,19 @@
+query CommitPRQuery($owner: String!, $repo: String!, $oid: GitObjectID) {
+  repository(owner: $owner, name: $repo) {
+    object(oid: $oid) {
+      __typename
+      ... on Commit {
+	associatedPullRequests(first: 1) {
+	  nodes {
+	    baseRepository {
+	      owner {
+		__typename
+		login
+	      }
+	    }
+	  }
+	}
+      }
+    }
+  }
+}