-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Open tag on remote option to tagView #3768
base: main
Are you sure you want to change the base?
Adds Open tag on remote option to tagView #3768
Conversation
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.
Please ensure this follows the patterns of "commits"
package.json
Outdated
@@ -3668,7 +3668,8 @@ | |||
"fileInCommit", | |||
"fileInBranch", | |||
"fileLine", | |||
"fileRange" | |||
"fileRange", | |||
"tagName" |
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.
Rename to tag
to match branch
, commit
, etc
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.
renamed
package.json
Outdated
@@ -3706,6 +3707,10 @@ | |||
"fileRange": { | |||
"type": "string", | |||
"markdownDescription": "Specifies the format of a range in a file URL for the custom remote service\n\nAvailable tokens\\\n`${start}` — starting line\\\n`${end}` — ending line" | |||
}, | |||
"tagName": { |
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.
Rename to tag
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.
renamed
package.json
Outdated
@@ -6752,6 +6757,12 @@ | |||
"title": "Open Commit on Remote", | |||
"icon": "$(globe)" | |||
}, | |||
{ |
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.
Add a gitlens.openTagOnRemote
command like commit/branch/etc for access from the Command Palette
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.
Should also not be placed in the middle of the commit commands, put it after
"command": "gitlens.views.openTagOnRemote", | ||
"when": "gitlens:repos:withRemotes && viewItem =~ /gitlens:tag\\b(.*?\\b\\+remote\\b)/", | ||
"group": "inline@99" | ||
}, |
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.
Add a gitlens.views.copyRemoteTagUrl
command and add it as an alt, like commit
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.
Needs to also follow the commit[s] pattern to add this to the context menu as well
@@ -580,6 +580,7 @@ export interface RemotesUrlsConfig { | |||
readonly fileInCommit: string; | |||
readonly fileLine: string; | |||
readonly fileRange: string; | |||
readonly tag: string; |
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.
This is correct once tagName
is renamed above
src/git/remotes/custom.ts
Outdated
@@ -100,6 +100,10 @@ export class CustomRemote extends RemoteProvider { | |||
return url; | |||
} | |||
|
|||
protected override getUrlForTag(tagName: string): string { | |||
return this.getUrl(this.urls.tag, this.getContext({ tagName: tagName })); |
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.
Rename to tag
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.
renamed
@@ -191,4 +191,8 @@ export class GerritRemote extends RemoteProvider { | |||
if (branch) return `${this.encodeUrl(`${this.getUrlForBranch(branch)}/${fileName}`)}${line}`; | |||
return `${this.encodeUrl(`${this.baseUrl}/+/HEAD/${fileName}`)}${line}`; | |||
} | |||
|
|||
protected override getUrlForTag(): string | undefined { | |||
return undefined; |
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.
Is there no support for tags?
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.
There is no tag details view for gerrit, only tags list view
src/views/nodes/tagsNode.ts
Outdated
@@ -33,13 +34,20 @@ export class TagsNode extends CacheableChildrenViewNode<'tags', ViewsWithTagsNod | |||
} | |||
|
|||
async getChildren(): Promise<ViewNode[]> { | |||
const remote = await this.repo.git.getBestRemoteWithProvider(); |
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.
Why is this outside the if below?
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.
moved inside
"title": "Open Tag on Remote", | ||
"category": "GitLens", | ||
"icon": "$(globe)" | ||
}, |
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.
Should also add gitlens.views.openTagOnRemote.multi
command to follow the pattern of commit[s]
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.
added
Description
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses