Skip to content
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

Merged
merged 4 commits into from Oct 24, 2019

Conversation

@xuhas
Copy link
Contributor

xuhas commented May 26, 2019

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.

@msftclas

This comment has been minimized.

Copy link

msftclas commented May 26, 2019

CLA assistant check
All CLA requirements met.

@xuhas xuhas referenced this pull request May 27, 2019
@joaomoreno joaomoreno added this to the Backlog milestone May 27, 2019
@joaomoreno joaomoreno added the git label May 27, 2019
Copy link

BartoszJakubZielonka left a comment

For me, everything is ok

@@ -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({

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Aug 9, 2019

Member

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.

This comment has been minimized.

Copy link
@xuhas

xuhas Aug 9, 2019

Author Contributor

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); }

This comment has been minimized.

Copy link
@xuhas

xuhas Aug 20, 2019

Author Contributor

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?

This comment has been minimized.

Copy link
@joaomoreno
@xuhas

This comment has been minimized.

Copy link
Contributor Author

xuhas commented Aug 20, 2019

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.

extensions/git/package.json Show resolved Hide resolved
extensions/git/package.json Show resolved Hide resolved
extensions/git/src/git.ts Show resolved Hide resolved
@joaomoreno joaomoreno force-pushed the xuhas:master branch from f402575 to 32d59ba Oct 24, 2019
@joaomoreno joaomoreno modified the milestones: Backlog, October 2019 Oct 24, 2019
@joaomoreno joaomoreno merged commit 32d59ba into microsoft:master Oct 24, 2019
1 of 2 checks passed
1 of 2 checks passed
VS Code #20190820.62 failed
Details
license/cla All CLA requirements met.
Details
@joaomoreno

This comment has been minimized.

Copy link
Member

joaomoreno commented Oct 24, 2019

I've cleaned it up and made it simpler. Great job @xuhas, thanks a lot! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.