-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
- Uses GraphQL - Has a page for cloning from URL
Previously were just returning repositories that belong to orgs. Now return the user's owned repositories as well, and group by owner in the list. Currently returning only first 100 org repositories because of octokit/octokit.graphql.net#132 .
In case it hasn't been considered yet, a potentially "quick & dirty" flow for this is to pop up a modal dialog on top of the clone dialog that give the individual the option to log out. I'd imagine the flow to break down like this:
|
Conflicts: src/GitHub.App/Resources.resx src/GitHub.VisualStudio.UI/Properties/AssemblyInfo.cs
Now that we've updated Octokit.GraphQL.
So we can return the scopes as well as the user.
This looks great to me @grokys ! One thing that I ran into was when I wanted to enter the username and repo to clone - ex I authenticated with it, but it didn't actually sign me in and I got an error like this Is it possible to show our Sign in dialog here instead to avoid this from possibly confusing users? |
@meaghanlewis hmm yes, I'm not quite sure how to deal with that. If the repository is publicly visible then this clone should actually work. We could make a check to see if we have a connection to the server that the clone is being requested from, but again, the clone may actually work. I notice desktop does the same thing in this situation and shows a login dialog. I'm tempted to say that this is expected behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, wrong PR. 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing Approve
to Comment
.
hey @grokys im okay to leave the behavior the same when trying to clone a private repo while signed out of a GitHub account. This might just be an edge case and there is a workaround anyway to sign into the account first and then clone. |
To make error messages appear in clone dialog.
Refactored the clone dialog, basing it initially on the clone dialog from desktop:
Features
Screenshots
Particularly the URL clone view needs some input from @donokuda.
Scopes
GraphQL requires the
read:org
scope the access the user's repositories. This means that the user will have to log out and back in again to use the clone dialog. The following message will be shown in this case (needs input from @donokuda):Caveats
You currently need to log out and back in because the GraphQL query needs theThis is now implementedread:org
scope which your previous login won't have. Need to implement a "You need to log out and back in again" flow in the dialog for this.Only showing first 100 org repositories because of "Must be reducible node" exception with AllPages(). octokit/octokit.graphql.net#132now fixed.Depends on #1761
Closes #1757