Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@jcansdale
Copy link
Collaborator

The current implementation of Open from GitHub will automatically select the URL tab and fill the text box when the clipboard contains a URL. This is overly eager and will trigger for non-repository URLs

What this PR does

  • Add a Repository to LinkType enum
  • Update GitHubContextService to know about LinkType.Repository URLs
  • Only automatically select URL tab for supported link types (currently Repository and Blob)

How to test

  1. Select File > Open > Open from GitHub... with any of the following
https://github.com/github/VisualStudio
https://github.com/github/VisualStudio.git
https://github.com/github/VisualStudio/blob/master/src/GitHub.VisualStudio/GitHubPackage.cs
  1. The Open from GitHub dialog should appear with URL tab selected and field filled
  2. Select File > Open > Open from GitHub... with any of the following
https://github.com
https://github.com/github
https://github.com/github/VisualStudio/commit/285c6649f319bd822c8d4cc283f869aeac33fd7d
  1. The Open from GitHub dialog should appear with GitHub tab selected

Fixes #2176

Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM 👍

@jcansdale jcansdale merged commit 8c2c96b into master Jan 14, 2019
@jcansdale jcansdale deleted the fixes/2176-recognize-repository-urls branch January 14, 2019 17:11
@meaghanlewis meaghanlewis added this to the 2.6.3 milestone Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants