In RHS, display whether there are linked pull requests to issues, and if there are linked issues for pull requests
It would be good to know when looking at Your Assignments if there is a submitted pull request that fixes an issue. That way the user can filter out issues that have already been addressed by an open pull request when looking at assigned tasks.
I'm not sure if this is something we already have access to given the requests we are making to GitHub's API. If this feature requires more API requests that we are not already making, I'm inclined to say this feature is not worth implementing.
4/5, I think its not worth implementing, it will need additional API requests. We are fetching data from Link. We may get that data if assign same PR to current user, not doing that would lead to unexpected behavior.
@sanjaydemansol Thanks for looking into the issue. Do you think this would be feasible using the GraphQL service being used in this PR https://github.com/mattermost/mattermost-plugin-github/pull/404?
Yeah, it should be, in GraphQL. I will look into that.
Hi @mickmister , I looked into it. 2/5 It is possible via Graphql. Here is an example I have prepared where, we have fetched title to referenced PR.
{
search(first: 3, type: ISSUE, query: "user:sanjaydemansol is:open") {
issueCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
... on Issue {
createdAt
title
url
number
timelineItems(last: 2) {
edges {
node {
... on ConnectedEvent {
subject {
... on PullRequest {
title
}
}
}
}
}
}
}
}
}
}
}
@sanjaydemansol The query doesn't quite seem right. E.g. it gives me https://github.com/hanzei/plugin-test/issues/3 as a result.
@sanjaydemansol If you want to get into graphql, wrapping up https://github.com/mattermost/mattermost-plugin-github/pull/404 might be a good starting point.
@sanjaydemansol If you want to get into graphql, wrapping up #404 might be a good starting point.
@hanzei Yes that PR should probably be merged before any other work is using GraphQL, as the PR introduces a robust checking of the plugin settings etc. to construct the GraphQL queries properly.
We should only implement and maintain one solution to GraphQL, so 2/5 it makes the most sense to complete and merge that PR first and foremost.