Skip to content

Commit f67153a

Browse files
author
Jonathan Cardona
authored
Create search-for-issue-or-bug-requests.graphql
This query will provide a 'paper trail' of Issues and PRs pertaining to a particular Issue when passing in a GitHub Search string.
1 parent 9d2b1b7 commit f67153a

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This query accepts a variable containing the search syntax that can be learned at:
2+
# https://docs.github.com/en/github/searching-for-information-on-github/understanding-the-search-syntax
3+
#
4+
# Then will return any Issues & any associated PRs or Issues that reference the parent issue
5+
# Useful for finding a 'paper trail' of any particular feature requests or bug fixes
6+
#
7+
#
8+
query findFeedbackTrail($searchCriteria: String!) {
9+
search(first: 20, type: ISSUE, query: $searchCriteria) {
10+
edges {
11+
node {
12+
__typename
13+
... on Issue {
14+
number
15+
title
16+
repository {
17+
name
18+
}
19+
timelineItems(first: 50, itemTypes: CROSS_REFERENCED_EVENT) {
20+
nodes {
21+
... on CrossReferencedEvent {
22+
source {
23+
__typename
24+
# Show any PRs associated with the Issue
25+
... on PullRequest {
26+
title
27+
number
28+
files(first: 100) {
29+
nodes {
30+
path
31+
}
32+
pageInfo {
33+
hasNextPage
34+
endCursor
35+
}
36+
}
37+
}
38+
# Show any Issues referencing the returned Issue
39+
... on Issue {
40+
title
41+
number
42+
url
43+
}
44+
}
45+
}
46+
}
47+
pageInfo {
48+
hasNextPage
49+
endCursor
50+
}
51+
}
52+
}
53+
}
54+
}
55+
pageInfo {
56+
hasNextPage
57+
endCursor
58+
}
59+
}
60+
}
61+

0 commit comments

Comments
 (0)