Skip to content

Commit fada2c4

Browse files
committed
List of MorphoCloudWorkflow changes: ``` $ git shortlog d4e1ccb..e2141dd --no-merges Jean-Christophe Fillion-Robin (1): feat: Rename command from "/delete" to "/delete_instance" ``` See MorphoCloud/MorphoCloudWorkflow@d4e1ccb...e2141dd
1 parent c75e50c commit fada2c4

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

.github/actions/control-instance/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
required: true
1212
command_name:
1313
description:
14-
"Name of the command to execute: create, delete, shelve, unshelve"
14+
"Name of the command to execute: create, delete_instance, shelve, unshelve"
1515
required: true
1616
instance_name_prefix:
1717
description: "Instance name prefix"
@@ -34,8 +34,8 @@ runs:
3434
- name: Validate command
3535
shell: bash
3636
run: |
37-
if [[ ! $COMMAND_NAME =~ ^create|delete|shelve|unshelve$ ]]; then
38-
echo "::error ::Unknown command name 'COMMAND_NAME'. Valid commands are 'create', 'delete', 'shelve' or 'unshelve'."
37+
if [[ ! $COMMAND_NAME =~ ^create|delete_instance|shelve|unshelve$ ]]; then
38+
echo "::error ::Unknown command name 'COMMAND_NAME'. Valid commands are 'create', 'delete_instance', 'shelve' or 'unshelve'."
3939
exit 1
4040
fi
4141
env:
@@ -51,7 +51,7 @@ runs:
5151
expected_status="ACTIVE"
5252
elif [[ $COMMAND_NAME == "create" ]]; then
5353
expected_status="ACTIVE"
54-
elif [[ $COMMAND_NAME == "delete" ]]; then
54+
elif [[ $COMMAND_NAME == "delete_instance" ]]; then
5555
expected_status=""
5656
fi
5757
echo "expected_status [$expected_status]"
@@ -245,4 +245,4 @@ runs:
245245
issue_number: ${{ inputs.issue_number }}
246246
instance_name: ${{ steps.define.outputs.instance_name }}
247247
instance_status:
248-
${{ inputs.command_name == 'delete' && 'DELETED' || '' }}
248+
${{ inputs.command_name == 'delete_instance' && 'DELETED' || '' }}

.github/workflows/control-instance-from-workflow.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
type: number
1010
command_name:
1111
description:
12-
"Name of the command to execute: create, delete, shelve, unshelve"
12+
"Name of the command to execute: create, delete_instance, shelve,
13+
unshelve"
1314
required: true
1415
type: string
1516
workflow_call:
@@ -20,7 +21,8 @@ on:
2021
type: number
2122
command_name:
2223
description:
23-
"Name of the command to execute: create, delete, shelve, unshelve"
24+
"Name of the command to execute: create, delete_instance, shelve,
25+
unshelve"
2426
required: true
2527
type: string
2628
permissions:

.github/workflows/control-instance.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
${{ !github.event.issue.pull_request && (
1717
contains(github.event.comment.body, '/unshelve') ||
1818
contains(github.event.comment.body, '/shelve') ||
19-
contains(github.event.comment.body, '/delete') ) }}
19+
contains(github.event.comment.body, '/delete_instance') ) }}
2020
steps:
2121
- name: unshelve command
2222
id: unshelve_command
@@ -42,11 +42,11 @@ jobs:
4242
"${{ vars.MORPHOCLOUD_GITHUB_ADMINS }},${{
4343
github.event.issue.user.login }}"
4444

45-
- name: delete command
46-
id: delete_command
45+
- name: delete_instance command
46+
id: delete_instance_command
4747
uses: github/[email protected]
4848
with:
49-
command: "/delete"
49+
command: "/delete_instance"
5050
reaction: "rocket"
5151
allowed_contexts: "issue"
5252
permissions: "write,maintain,admin"
@@ -57,7 +57,7 @@ jobs:
5757
if:
5858
${{ steps.unshelve_command.outputs.continue == 'true' ||
5959
steps.shelve_command.outputs.continue == 'true' ||
60-
steps.delete_command.outputs.continue == 'true' }}
60+
steps.delete_instance_command.outputs.continue == 'true' }}
6161
run: |
6262
if [[ "$UNSHELVE_COMMAND_CONTINUE" == "true" ]]; then
6363
continue="$UNSHELVE_COMMAND_CONTINUE"
@@ -67,10 +67,10 @@ jobs:
6767
continue="$SHELVE_COMMAND_CONTINUE"
6868
command_name="shelve"
6969
comment_id="${{ steps.shelve_command.outputs.comment_id }}"
70-
elif [[ "$DELETE_COMMAND_CONTINUE" == "true" ]]; then
71-
continue="$DELETE_COMMAND_CONTINUE"
72-
command_name="delete"
73-
comment_id="${{ steps.delete_command.outputs.comment_id }}"
70+
elif [[ "$DELETE_INSTANCE_COMMAND_CONTINUE" == "true" ]]; then
71+
continue="$DELETE_INSTANCE_COMMAND_CONTINUE"
72+
command_name="delete_instance"
73+
comment_id="${{ steps.delete_instance_command.outputs.comment_id }}"
7474
else
7575
continue="false"
7676
command_name=""
@@ -83,7 +83,8 @@ jobs:
8383
UNSHELVE_COMMAND_CONTINUE:
8484
${{ steps.unshelve_command.outputs.continue }}
8585
SHELVE_COMMAND_CONTINUE: ${{ steps.shelve_command.outputs.continue }}
86-
DELETE_COMMAND_CONTINUE: ${{ steps.delete_command.outputs.continue }}
86+
DELETE_INSTANCE_COMMAND_CONTINUE:
87+
${{ steps.delete_instance_command.outputs.continue }}
8788

8889
- uses: actions/checkout@v4
8990

issue-commands.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
_The commands described below may be added as issue comments. Only one command
44
may be entered per comment._
55

6-
| Command | Description | Who |
7-
| --------------- | -------------------------------------------------- | -------------------- |
8-
| `/shelve` | Shelve the instance. | Issue creator, Admin |
9-
| `/unshelve` | Unshelve the instance. | Issue creator, Admin |
10-
| `/encode_email` | Update issue description obfuscating email. | Issue creator, Admin |
11-
| `/decode_email` | Update issue description deobfuscating email. | Issue creator, Admin |
12-
| `/email` | Send email to _Issue creator_ with connection URL. | Issue creator, Admin |
13-
| `/create` | Create the instance. | Admin |
14-
| `/delete` | Delete the instance. | Admin |
6+
| Command | Description | Who |
7+
| ------------------ | -------------------------------------------------- | -------------------- |
8+
| `/shelve` | Shelve the instance. | Issue creator, Admin |
9+
| `/unshelve` | Unshelve the instance. | Issue creator, Admin |
10+
| `/encode_email` | Update issue description obfuscating email. | Issue creator, Admin |
11+
| `/decode_email` | Update issue description deobfuscating email. | Issue creator, Admin |
12+
| `/email` | Send email to _Issue creator_ with connection URL. | Issue creator, Admin |
13+
| `/create` | Create the instance. | Admin |
14+
| `/delete_instance` | Delete the instance. | Admin |

0 commit comments

Comments
 (0)