Skip to content

Commit 9dcbccc

Browse files
committed
New description after feedback
Co-authored by: Tom Bamford
1 parent 5476a53 commit 9dcbccc

1 file changed

Lines changed: 35 additions & 14 deletions

File tree

commands/host/tw-description

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,35 @@ if [ -z "$MR_LINK" ]; then
9090
exit 1
9191
fi
9292

93-
# Prompt for deploy state/notes - pre-fill default checklist items for inline editing
94-
echo_yellow "Edit deploy checklist (arrow keys to edit, clear a line to remove it, empty line to finish):"
93+
# Prompt for deploy state - pre-fill default checklist items for inline editing
94+
echo_yellow "Edit deploy state checklist (arrow keys to edit, clear a line to remove it, empty line to finish):"
9595
DEPLOY_ITEMS=()
96-
for default_item in "* [ ] Merge Dev" "* [ ] Merge Production"; do
96+
for default_item in "* [ ] Deployed to Dev" "* [ ] Deployed to Production"; do
9797
read -e -i "$default_item" -r line
9898
[ -n "$line" ] && DEPLOY_ITEMS+=("$line")
9999
done
100-
echo_yellow "Add more items (empty line to finish):"
100+
echo_yellow "Add more state items (empty line to finish):"
101101
while IFS= read -r line; do
102102
[ -z "$line" ] && break
103103
DEPLOY_ITEMS+=("$line")
104104
done
105105
DEPLOY_STATE=$(printf '%s\n' "${DEPLOY_ITEMS[@]}")
106106

107+
# Prompt for deployment steps (checklist, optional)
108+
DEPLOY_STEPS_ITEMS=()
109+
echo_yellow "Enter deployment steps (arrow keys to edit, empty line to finish, leave blank to skip):"
110+
while IFS= read -r line; do
111+
[ -z "$line" ] && break
112+
# Auto-prefix with checkbox if not already
113+
[[ "$line" == "* [ ]"* ]] || line="* [ ] $line"
114+
DEPLOY_STEPS_ITEMS+=("$line")
115+
done
116+
if [ ${#DEPLOY_STEPS_ITEMS[@]} -eq 0 ]; then
117+
DEPLOY_STEPS="_no manual steps required/provided_"
118+
else
119+
DEPLOY_STEPS=$(printf '%s\n' "${DEPLOY_STEPS_ITEMS[@]}")
120+
fi
121+
107122
# Prompt for test notes (multiline, optional)
108123
TEST_NOTES=""
109124
echo_yellow "Enter test notes/plan (empty line to finish, leave blank to skip):"
@@ -181,23 +196,29 @@ else
181196
fi
182197

183198
# Build new section to append
184-
NEW_SECTION="## Deployment Notes ($(date +%Y-%m-%d))
185-
186-
**MR: ${MR_LINK}**
199+
NEW_SECTION="## Deployment notes
187200
188-
#### Branch
189-
190-
\`\`\`
191-
${branch_name}
192-
\`\`\`
201+
- Date: $(date +%Y-%m-%d)
202+
- MR: ${MR_LINK}
203+
- Branch: \`${branch_name}\`
193204
194205
#### State
195206
196207
${DEPLOY_STATE}
197208
198-
#### Test / Code Review Notes
209+
#### Testing
199210
200-
${TEST_NOTES}"
211+
${TEST_NOTES}
212+
213+
#### Deployment steps
214+
215+
${DEPLOY_STEPS}
216+
217+
#### Approval
218+
219+
* [ ] Code Review and approved
220+
* [ ] Internal QA successful
221+
* [ ] Client acceptance (or N/A)"
201222

202223
# Combine existing and new
203224
FULL_DESCRIPTION="${EXISTING_DESC}${NEW_SECTION}"

0 commit comments

Comments
 (0)