-
Notifications
You must be signed in to change notification settings - Fork 29k
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
added deleteTag #74345
added deleteTag #74345
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.
For me, everything is ok
extensions/git/src/commands.ts
Outdated
@@ -1631,6 +1631,22 @@ export class CommandCenter { | |||
await repository.tag(name, message); | |||
} | |||
|
|||
@command('git.deleteTag', { repository: true }) | |||
async deleteTag(repository: Repository): Promise<void> { | |||
const inputTagName = await window.showInputBox({ |
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.
We shouldn't be asking the user to provide a tag name here. We should show the user a picker to choose which tag should be deleted.
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.
Good point, I will try to implement the suggested solution in the coming week. Thank you for the feedback.
@@ -38,6 +38,25 @@ class CheckoutItem implements QuickPickItem { | |||
} | |||
} | |||
|
|||
class TagItem implements QuickPickItem { | |||
|
|||
get label(): string { return (this.tag.name || '').substr(0, 20); } |
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.
Hi @joaomoreno , I would like your input on the label length allowed for the quick pick items. For now, I am arbitrarily cropping the tag label to 20 characters , this rest of the line is taken by the tag message. I am wondering if 20 characters is ok?
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.
Sure.
Hi @joaomoreno , I made the requested changes by adding a quick pick Item. Let me know if there is anything I could do to make this better. |
I've cleaned it up and made it simpler. Great job @xuhas, thanks a lot! 🍻 |
Hi, this is my first try at contributing and I tried to tackle the feature request for deleting tags in a given git repo (#74147) .
My changes are based on the createTag command.
Let me know if there is something I could change to make this better.