@@ -116,23 +116,17 @@ async fn prepare_goals(
116116
117117 let tldr = tldr ( & issue_id, & mut comments) ?;
118118
119- let help_wanted = help_wanted ( & issue_id, & comments) ?;
119+ let ( has_help_wanted , help_wanted) = help_wanted ( & issue_id, & tldr , & comments) ?;
120120
121121 let why_this_goal = why_this_goal ( & issue_id, issue) ?;
122122
123- progress_bar:: print_progress_bar_info (
124- & format ! ( "Issue #{number}" , number = issue. number) ,
125- & format ! ( "tldr={}, c={}" , tldr. is_some( ) , comments. len( ) ) ,
126- progress_bar:: Color :: Green ,
127- progress_bar:: Style :: Bold ,
128- ) ;
129-
130123 result. push ( UpdatesGoal {
131124 title : title. clone ( ) ,
132125 issue_number : issue. number ,
133126 issue_assignees : comma ( & issue. assignees ) ,
134127 issue_url : issue_id. url ( ) ,
135128 progress,
129+ has_help_wanted,
136130 help_wanted,
137131 is_closed : issue. state == GithubIssueState :: Closed ,
138132 num_comments : comments. len ( ) ,
@@ -162,12 +156,15 @@ fn tldr(
162156/// Search for comments that talk about help being wanted and extract that
163157fn help_wanted (
164158 _issue_id : & IssueId ,
159+ tldr : & Option < String > ,
165160 comments : & [ ExistingGithubComment ] ,
166- ) -> anyhow:: Result < Vec < HelpWanted > > {
161+ ) -> anyhow:: Result < ( bool , Vec < HelpWanted > ) > {
167162 use std:: fmt:: Write ;
168163
169164 let mut help_wanted = vec ! [ ] ;
170165
166+ let tldr_has_help_wanted = tldr. as_deref ( ) . unwrap_or ( "" ) . lines ( ) . any ( |line| HELP_WANTED . is_match ( line) ) ;
167+
171168 for comment in comments {
172169 let mut lines = comment. body . split ( '\n' ) . peekable ( ) ;
173170
@@ -194,7 +191,7 @@ fn help_wanted(
194191 }
195192 }
196193
197- Ok ( help_wanted)
194+ Ok ( ( tldr_has_help_wanted || ! help_wanted. is_empty ( ) , help_wanted ) )
198195}
199196
200197fn why_this_goal (
0 commit comments