From 8b799544a9fb9f189223a82dc3af1dcfcade0ceb Mon Sep 17 00:00:00 2001 From: neuecc Date: Fri, 8 Nov 2024 18:31:56 +0900 Subject: [PATCH] RM --- OpenOnGitHub/GitRepository.cs | 3 +-- README.md | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/OpenOnGitHub/GitRepository.cs b/OpenOnGitHub/GitRepository.cs index 0dbe62b..39d178f 100644 --- a/OpenOnGitHub/GitRepository.cs +++ b/OpenOnGitHub/GitRepository.cs @@ -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; diff --git a/README.md b/README.md index 2aa4546..0043e31 100644 --- a/README.md +++ b/README.md @@ -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 ---