Skip to content

Add issue delete command#2839

Merged
vilmibm merged 5 commits intocli:trunkfrom
kevinmbeaulieu:kb/delete-issue-cmd
Jan 28, 2021
Merged

Add issue delete command#2839
vilmibm merged 5 commits intocli:trunkfrom
kevinmbeaulieu:kb/delete-issue-cmd

Conversation

@kevinmbeaulieu
Copy link
Contributor

Similar to issue close, but for deleting an issue rather than
just closing it.

Resolves #2820.

Similar to `issue close`, but for deleting an issue rather than
just closing it.

Resolves cli#2820.
@kevinmbeaulieu
Copy link
Contributor Author

Hm when I run the test suite locally, I get the same failures on trunk as I do on this branch- any ideas of what's going on would be appreciated

@vilmibm vilmibm self-assigned this Jan 25, 2021
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

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

In general we prefer PRs for things with a help-wanted label, but in this case we're into the feature so we can see it through 👍

This is a solid PR! We'd like a confirmation step, though, since issue deletion is irreversible.

When this command is run attached to a terminal, please add a confirmation step like the following:

You're going to delete issue #1234. This action cannot be reversed. To confirm, type the issue number:

I'm also curious what the behavior is if a user that is not an admin attempts to delete an issue?

thanks!

@kevinmbeaulieu
Copy link
Contributor Author

In general we prefer PRs for things with a help-wanted label

Ah makes sense, will check for that in the future

When this command is run attached to a terminal, please add a confirmation step like the following:

@vilmibm If the command is run in a non-interactive context, would you prefer it just skip the confirmation step or throw an error?

@kevinmbeaulieu
Copy link
Contributor Author

I'm also curious what the behavior is if a user that is not an admin attempts to delete an issue?

And regarding this, it outputs kevinmbeaulieu does not have the correct permissions to execute `DeleteIssue` .

Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

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

the prompt looks great! The logic for prompting just needs tweaking and otherwise this is just about ready. Thanks!

Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

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

tested locally and it looks great! thank you!!

@vilmibm vilmibm merged commit d91b312 into cli:trunk Jan 28, 2021
@kevinmbeaulieu kevinmbeaulieu deleted the kb/delete-issue-cmd branch January 28, 2021 00:43
IssueID: issue.ID,
},
}

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow delete issues with gh

3 participants