File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ use crate::{
31
31
interactions:: EditIssueBody ,
32
32
} ;
33
33
use anyhow:: { bail, Context as _} ;
34
+ use octocrab:: models:: AuthorAssociation ;
34
35
use parser:: command:: assign:: AssignCommand ;
35
36
use parser:: command:: { Command , Input } ;
36
37
use rand:: seq:: IteratorRandom ;
@@ -195,15 +196,10 @@ pub(super) async fn handle_input(
195
196
// want any assignments or noise.
196
197
return Ok ( ( ) ) ;
197
198
}
198
- // This is temporarily disabled until we come up with a better
199
- // solution, or decide to remove this. The `is_new_contributor` query
200
- // is too expensive and takes too long to process.
201
- let welcome = if false
202
- && ctx
203
- . github
204
- . is_new_contributor ( & event. repository , & event. issue . user . login )
205
- . await
206
- {
199
+ let welcome = if matches ! (
200
+ event. issue. author_association,
201
+ AuthorAssociation :: FirstTimer | AuthorAssociation :: FirstTimeContributor
202
+ ) {
207
203
let who_text = match & assignee {
208
204
Some ( assignee) => WELCOME_WITH_REVIEWER . replace ( "{assignee}" , & assignee. name ) ,
209
205
None => WELCOME_WITHOUT_REVIEWER . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments