diff --git a/src/teamwork.sh b/src/teamwork.sh index 32e5c31e..69ef6b11 100644 --- a/src/teamwork.sh +++ b/src/teamwork.sh @@ -144,7 +144,8 @@ teamwork::pull_request_opened() { # local -r pr_stats=$(github::get_pr_patch_stats) local -r pr_body=$(github::get_pr_body) # IFS=" " read -r -a pr_stats_array <<< "$pr_stats" -# TODO: extract actual PR comments from body, exclude Author and Reviewer checklist from PR template + local -r substring="##Teamwork task link" #discard anything from this text onwards in the PR template + local -r extracted_body=${pr_body%%$substring*} teamwork::add_comment " **$user** opened a PR: **[$pr_title]($pr_url)** @@ -152,7 +153,7 @@ teamwork::pull_request_opened() { --- -${pr_body} +${extracted_body} " teamwork::add_tag "PR Open"