Skip to content

Commit

Permalink
RM
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Nov 8, 2024
1 parent eb6b7a2 commit 8b79954
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions OpenOnGitHub/GitRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ public async Task InitializeAsync()
_rootDirectory = Path.GetDirectoryName(_innerRepository.GitPath);

var mainBranches = new[] { "main", "master", "develop" }; // development is Contains
var developBranches = new[] { "develop" };
var branches = await _innerRepository.GetBranchHeadReferencesAsync();
var branchesNames = branches.Select(x => x.Name).ToArray();

MainBranchName = SearchMainBranchName(branchesNames);
DevelopBranchName = branchesNames.FirstOrDefault(b => developBranches.Contains(b, StringComparer.OrdinalIgnoreCase));
DevelopBranchName = branchesNames.FirstOrDefault(b => b.ToLower().Contains("develop"));
if (MainBranchName == DevelopBranchName)
{
DevelopBranchName = null;
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ Open on GitHub
===
Visual Studio Extension for opening files on GitHub, GitLab, Gitea,Gitee, Bitbucket and AzureDevOps (dev.azure.com, visualstudio.com, tfs)

![](screenshot.jpg)
![image](https://github.com/user-attachments/assets/42186b47-20e6-453f-bd2f-3726469883db)

Right click on editor, if repository is hosted on GitHub, you can jump to master/current branch/current revision's blob page. If selecting line(single, range) in editor, jump with line number fragment.
Right click on editor, if repository is hosted on GitHub(or GitLab, etc..), you can jump to main(master)/develop(development)/current branch/current revision(short and full)'s blob page with line number fragment in carret or selected range.

If open context menu on document tab or solution explorer's file, jump to blob page without fragment.

Open on GitHub also supports SourceLink page.

![image](https://github.com/user-attachments/assets/82c39059-379b-4651-b46f-ab1d51a08ca9)

For example, you can jump to dotnet/runtime page directly.

![image](https://github.com/user-attachments/assets/41107872-99de-4817-87d9-80899227997c)

Install
---
Expand Down

0 comments on commit 8b79954

Please sign in to comment.