Skip to content

Add query to search for Issues & associated PRs/Issues #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions graphql/queries/search-for-issue-or-bug-requests.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This query accepts a variable containing the search syntax that can be learned at:
# https://docs.github.com/en/github/searching-for-information-on-github/understanding-the-search-syntax
#
# Then will return any Issues & any associated PRs or Issues that reference the parent issue
# Useful for finding a 'paper trail' of any particular feature requests or bug fixes
#
#
query findFeedbackTrail($searchCriteria: String!) {
search(first: 20, type: ISSUE, query: $searchCriteria) {
edges {
node {
__typename
... on Issue {
number
title
repository {
name
}
timelineItems(first: 50, itemTypes: CROSS_REFERENCED_EVENT) {
nodes {
... on CrossReferencedEvent {
source {
__typename
# Show any PRs associated with the Issue
... on PullRequest {
title
number
files(first: 100) {
nodes {
path
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Show any Issues referencing the returned Issue
... on Issue {
title
number
url
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}