We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6398515 commit 5f6814bCopy full SHA for 5f6814b
1 file changed
src/teamwork.sh
@@ -144,15 +144,16 @@ teamwork::pull_request_opened() {
144
# local -r pr_stats=$(github::get_pr_patch_stats)
145
local -r pr_body=$(github::get_pr_body)
146
# IFS=" " read -r -a pr_stats_array <<< "$pr_stats"
147
-# 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
148
+ local -r extracted_body=${pr_body%%$substring*}
149
150
teamwork::add_comment "
151
**$user** opened a PR: **[$pr_title]($pr_url)**
152
\`$base_ref\` ⬅️ \`$head_ref\`
153
154
---
155
-${pr_body}
156
+${extracted_body}
157
"
158
159
teamwork::add_tag "PR Open"
0 commit comments