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
Merged

added deleteTag #74345

merged 4 commits into from
Oct 24, 2019

Conversation

xuhas
Copy link
Contributor

@xuhas 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
Copy link

msftclas commented May 26, 2019

CLA assistant check
All CLA requirements met.

@joaomoreno joaomoreno added this to the Backlog milestone May 27, 2019
@joaomoreno joaomoreno added the git GIT issues label May 27, 2019
Copy link

@Drockk Drockk left a 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

@@ -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({
Copy link
Member

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.

Copy link
Contributor Author

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); }
Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@xuhas
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
Copy link
Member

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

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants