Skip to content

Commit 5476a53

Browse files
committed
Improve Deployment notes for easier copy/paste and readability (citation needed)
1 parent a5bbd22 commit 5476a53

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

commands/host/tw-description

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,21 @@ while IFS= read -r line; do
104104
done
105105
DEPLOY_STATE=$(printf '%s\n' "${DEPLOY_ITEMS[@]}")
106106

107-
# Prompt for test notes (multiline)
107+
# Prompt for test notes (multiline, optional)
108108
TEST_NOTES=""
109-
while [ -z "$TEST_NOTES" ]; do
110-
echo_yellow "Enter test notes/plan (empty line to finish):"
111-
while IFS= read -r line; do
112-
if [ -z "$line" ]; then
113-
break
114-
fi
115-
if [ -n "$TEST_NOTES" ]; then
116-
TEST_NOTES="${TEST_NOTES}
109+
echo_yellow "Enter test notes/plan (empty line to finish, leave blank to skip):"
110+
while IFS= read -r line; do
111+
[ -z "$line" ] && break
112+
if [ -n "$TEST_NOTES" ]; then
113+
TEST_NOTES="${TEST_NOTES}
117114
${line}"
118-
else
119-
TEST_NOTES="$line"
120-
fi
121-
done
122-
if [ -z "$TEST_NOTES" ]; then
123-
echo_red "Test notes are required, please enter at least one line."
115+
else
116+
TEST_NOTES="$line"
124117
fi
125118
done
119+
if [ -z "$TEST_NOTES" ]; then
120+
TEST_NOTES="_no test notes provided_"
121+
fi
126122

127123
# Fetch Dev URL if upstream provider is platform or upsun
128124
UPSUN_DEV_URL=""
@@ -185,16 +181,21 @@ else
185181
fi
186182

187183
# Build new section to append
188-
NEW_SECTION="## Deployment
184+
NEW_SECTION="## Deployment Notes ($(date +%Y-%m-%d))
185+
186+
**MR: ${MR_LINK}**
187+
188+
#### Branch
189189
190-
- MR: ${MR_LINK}
191-
- Branch: \`${branch_name}\`
190+
\`\`\`
191+
${branch_name}
192+
\`\`\`
192193
193194
#### State
194195
195196
${DEPLOY_STATE}
196197
197-
#### Test
198+
#### Test / Code Review Notes
198199
199200
${TEST_NOTES}"
200201

0 commit comments

Comments
 (0)