Show suggested reviewers and limit list to assignable users#1428
Show suggested reviewers and limit list to assignable users#1428RMacfarlane merged 2 commits intomicrosoft:masterfrom
Conversation
src/github/graphql.ts
Outdated
There was a problem hiding this comment.
Now it is properly typed as an array instead of a tuple with one element.
Not directly related to PR, but changed to match AssignableUsersResponse
f02f969 to
091e331
Compare
src/github/pullRequestOverview.ts
Outdated
There was a problem hiding this comment.
From what I've seen in a few repositories - suggested reviewers always were present in assignable users list.
Are there cases when it won't be true?
There was a problem hiding this comment.
I think this is a safe assumption. I just tried removing a collaborator who was previously a suggested reviewer and they were removed from both lists
src/github/pullRequestManager.ts
Outdated
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
After implementations comparison suggestedReviewers on PullRequestModel looks better than with separate request - pushed updated PullRequestModel
091e331 to
98e9d86
Compare
|
I also found |
f8ee7ea to
767265c
Compare
|
I found this doc on different permissions levels: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#repository-access-for-each-permission-level The row "Have an issue assigned to them" is checked for all permissions levels, so it seems to me like |
src/github/queries.gql
Outdated
There was a problem hiding this comment.
can you also update the enterprise.gql file? this query and the above should work with the oldest supported github enterprise version https://developer.github.com/enterprise/2.16/v4/object/repository/
There was a problem hiding this comment.
Checked it yesterday to see if it has support and missed/failed somehow
|
@RMacfarlane I saw this doc however I still have some problems with understanding levels across different repos: looks like doc is only for orgs and doesn't mention collaborators role, however personal repos only has collaborators list. Looks like Collaborator = Write from table, and only Write+ can "Submit reviews that affect a pull request's mergeability". Still cant find info if it still possible to ask for review from person even if their review can't affect mergability. In any case - |
767265c to
4dac32a
Compare
RMacfarlane
left a comment
There was a problem hiding this comment.
This looks good to me! I will go ahead and merge it.
|
Thanks for review and suggestions! |
|
This looks fantastic! I can't wait to try it out. Thanks folks! |
Fixes #1424
This PR provides next improvements to add reviewers (quick)pick list:
Suggested reviewers are displayed at the top of the pick list with suggestion reason below login and name.
It is possible to add ⭐ before their logins to make suggested reviewers look more distinctive, but skipped this until review.
Only assignable users are displayed in pick list instead of all mentionable users. Big improvement for list in some repos.
List is now sorted by
login(sort is case insensitive, same as quick pick built-in filter)The only difference from GitHub that I've noticed is that I'm in list of suggested reviewers even if I already posted review - example from same PR.
It may be related to fact that GitHub has "Re-request review" for existing reviewers, but AFAIK this extension doesn't support this action so I left filtering out existing reviewers from suggested at this point.