@@ -195,33 +195,28 @@ teamwork::pull_request_review_submitted() {
195195 local -r review_state=$( github::get_review_state)
196196 local -r comment=$( github::get_review_comment)
197197
198- # # Message when PR has been approved
198+ # # Message when PR has been approved, don't include body message
199199 if [ " $review_state " == " approved" ]; then
200200 teamwork::add_comment "
201201**$user ** submitted a review to the PR: **[$pr_title ]($pr_url )**
202202
203203---
204204
205205Review: **$review_state ✅**"
206- if [ -n " $comment " ]; then
207- teamwork::add_comment " Comment: $comment "
208- fi
209206 teamwork::add_tag " PR Approved"
210207 teamwork::remove_tag " PR Changes Requested"
211208 teamwork::move_task_to_column " $BOARD_COLUMN_REVIEWED "
212209 fi
213210
214- # # Add a message if the PR has change requested
211+ # # Add a message if the PR has change requested, include body message
215212 if [ " $review_state " == " changes_requested" ]; then
216213 teamwork::add_comment "
217214**$user ** submitted a change request to the PR: **[$pr_title ]($pr_url )**
218215
219216---
220217
221- Review: **$review_state 😔**"
222- if [ -n " $comment " ]; then
223- teamwork::add_comment " Comment: $comment "
224- fi
218+ Review: **$review_state 😔**
219+ Comment: $comment "
225220
226221 teamwork::add_tag " PR Changes Requested"
227222 teamwork::remove_tag " PR Approved"
232227teamwork::pull_request_review_dismissed () {
233228 local -r user=$( github::get_sender_user)
234229 teamwork::add_comment " Review dismissed by $user "
235- if [ -n " $comment " ]; then
236- teamwork::add_comment " Comment: $comment "
230+ if [ -z " $comment " ]; then
231+ true
232+ else
233+ teamwork::add_comment " Comment: $comment "
237234 fi
238235 teamwork::remove_tag " PR Open"
239236 teamwork::remove_tag " PR Approved"
0 commit comments