-
Notifications
You must be signed in to change notification settings - Fork 36
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
Tekton: Delete
commands should show confirmation info message and run without terminal
#98
Conversation
Tekton: Delete
commands should show confirmation info message and run without terminalTekton: Delete
commands should show confirmation info message and run without terminal [WIP]
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
=========================================
+ Coverage 72.57% 73.77% +1.2%
=========================================
Files 19 19
Lines 999 1045 +46
Branches 148 148
=========================================
+ Hits 725 771 +46
Misses 274 274
Continue to review full report at Codecov.
|
ea3a1a9
to
f40960e
Compare
Tekton: Delete
commands should show confirmation info message and run without terminal [WIP]Tekton: Delete
commands should show confirmation info message and run without terminal
@@ -16,8 +18,15 @@ export class ClusterTask extends TektonItem { | |||
if (clustertasks) { ClusterTask.tkn.executeInTerminal(Command.listClusterTasksinTerminal()); } | |||
} | |||
|
|||
static async delete(clustertask: TektonNode): Promise<void> { | |||
if (clustertask) { ClusterTask.tkn.executeInTerminal(Command.deleteClusterTask(clustertask.getName())); } | |||
static async delete(clustertask: TektonNode): Promise<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.
Seems to be good request except some issues with messages:
- Every message should start with capital letter.
- Should use appropriate articles a/an/the.
- Message should finish with './?/!'
- Custom resource names should be in camel case: ClusterTask, TaskRun, PiplelineResource, PipelineRun, Task, Pipeline
Below is an example:
const value = await window.showWarningMessage(`Do you want to delete the ClusterTask '${clustertask.getName()}\'?`, 'Yes', 'Cancel');
if (value === 'Yes') {
return Progress.execFunctionWithProgress(`Deleting the ClusterTask '${clustertask.getName()}'.`, () =>
ClusterTask.tkn.execute(Command.deleteClusterTask(clustertask.getName())))
.then(() => `The ClusterTask '${clustertask.getName()}' successfully deleted.`)
.catch((err) => Promise.reject(`Failure to delete the ClusterTask '${clustertask.getName()}': '${err}'.`));
Please rebase on top of origin/master. |
Fix: #92