소스 검색

Adds deep link to repo on branches & status

Adds deep link to branch on status
main
Eric Amodio 1 년 전
부모
커밋
c0262dbae1
2개의 변경된 파일16개의 추가작업 그리고 9개의 파일을 삭제
  1. +8
    -8
      package.json
  2. +8
    -1
      src/commands/copyDeepLink.ts

+ 8
- 8
package.json 파일 보기

@ -12191,7 +12191,7 @@
},
{
"submenu": "gitlens/share",
"when": "viewItem =~ /gitlens:(branch|commit|compare:results(?!:)|remote|repo-folder|repository|stash|tag|workspace|file\\b(?=.*?\\b\\+committed\\b))\\b/",
"when": "viewItem =~ /gitlens:(branch|commit|compare:(branch(?=.*?\\b\\+comparing\\b)|results(?!:))|remote|repo-folder|repository|stash|status:upstream|tag|workspace|file\\b(?=.*?\\b\\+committed\\b))\\b/",
"group": "7_gitlens_a_share@1"
},
{
@ -13625,22 +13625,22 @@
"gitlens/share": [
{
"command": "gitlens.copyDeepLinkToBranch",
"when": "viewItem =~ /gitlens:branch\\b/",
"when": "viewItem =~ /gitlens:(branch\\b(?=.*?\\b\\+(remote|tracking)\\b)|status:upstream(?!:none))\\b/",
"group": "1_gitlens@50"
},
{
"command": "gitlens.graph.copyDeepLinkToBranch",
"when": "webviewItem =~ /gitlens:branch\\b/",
"when": "webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)/",
"group": "1_gitlens@50"
},
{
"command": "gitlens.copyRemoteBranchUrl",
"when": "gitlens:hasRemotes && viewItem =~ /gitlens:branch\\b/",
"when": "gitlens:hasRemotes && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)/",
"group": "2_gitlens@50"
},
{
"command": "gitlens.graph.copyRemoteBranchUrl",
"when": "gitlens:hasRemotes && webviewItem =~ /gitlens:branch\\b/",
"when": "gitlens:hasRemotes && webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)/",
"group": "2_gitlens@50"
},
{
@ -13655,7 +13655,7 @@
},
{
"command": "gitlens.copyDeepLinkToComparison",
"when": "viewItem =~ /gitlens:compare:results(?!:)\\b/",
"when": "viewItem =~ /gitlens:compare:(branch(?=.*?\\b\\+comparing\\b)|results(?!:))\\b/",
"group": "1_gitlens@25"
},
{
@ -13695,7 +13695,7 @@
},
{
"command": "gitlens.copyDeepLinkToRepo",
"when": "viewItem =~ /gitlens:(remote|repo-folder|repository)\\b/",
"when": "viewItem =~ /gitlens:(branch\\b(?=.*?\\b\\+(remote|tracking)\\b)|remote|repo-folder|repository|status:upstream(?!:none))\\b/",
"group": "1_gitlens@99"
},
{
@ -13710,7 +13710,7 @@
},
{
"command": "gitlens.graph.copyDeepLinkToRepo",
"when": "webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+remote\\b)(?!.*?\\b\\+current\\b)/",
"when": "webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)/",
"group": "1_gitlens@99"
},
{

+ 8
- 1
src/commands/copyDeepLink.ts 파일 보기

@ -50,7 +50,14 @@ export class CopyDeepLinkCommand extends ActiveEditorCommand {
if (isCommandContextViewNodeHasCommit(context)) {
args = { refOrRepoPath: context.node.commit };
} else if (isCommandContextViewNodeHasBranch(context)) {
args = { refOrRepoPath: context.node.branch };
if (context.command === Commands.CopyDeepLinkToRepo) {
args = {
refOrRepoPath: context.node.branch.repoPath,
remote: context.node.branch.getRemoteName(),
};
} else {
args = { refOrRepoPath: context.node.branch };
}
} else if (isCommandContextViewNodeHasTag(context)) {
args = { refOrRepoPath: context.node.tag };
} else if (isCommandContextViewNodeHasRemote(context)) {

불러오는 중...
취소
저장