@@ -140,17 +140,17 @@ async fn rescan_pr(
140140 repo : Repository ,
141141 pr_number : u64 ,
142142) -> anyhow:: Result < ( ) > {
143- let issue = repo. get_issue ( gh, pr_number) . await ?;
143+ let pr = repo. get_pr ( gh, pr_number) . await ?;
144144 log:: debug!(
145145 "re-scanning unknown PR {} for merge conflict after delay" ,
146- issue . global_id( )
146+ pr . global_id( )
147147 ) ;
148- match issue . mergeable {
149- Some ( true ) => maybe_hide_comment ( gh, & mut db, & issue ) . await ?,
150- Some ( false ) => maybe_add_comment ( gh, & mut db, config, & issue , None ) . await ?,
148+ match pr . mergeable {
149+ Some ( true ) => maybe_hide_comment ( gh, & mut db, & pr ) . await ?,
150+ Some ( false ) => maybe_add_comment ( gh, & mut db, config, & pr , None ) . await ?,
151151 None => log:: info!(
152152 "re-scan of mergeable status still unknown for {}" ,
153- issue . global_id( )
153+ pr . global_id( )
154154 ) ,
155155 }
156156 Ok ( ( ) )
@@ -205,8 +205,8 @@ async fn scan_prs(
205205 . partition ( |pr| pr. mergeable == MergeableState :: Conflicting ) ;
206206
207207 for conflict in conflicting {
208- let issue = repo. get_issue ( gh, conflict. number ) . await ?;
209- maybe_add_comment ( gh, & mut db, config, & issue , possibly. as_deref ( ) ) . await ?;
208+ let pr = repo. get_pr ( gh, conflict. number ) . await ?;
209+ maybe_add_comment ( gh, & mut db, config, & pr , possibly. as_deref ( ) ) . await ?;
210210 }
211211 if !unknowns. is_empty ( ) {
212212 let config = config. clone ( ) ;
@@ -243,11 +243,11 @@ async fn scan_unknowns(
243243 repo. full_name
244244 ) ;
245245 for unknown in unknowns {
246- let issue = repo. get_issue ( & gh, unknown. number ) . await ?;
246+ let pr = repo. get_pr ( & gh, unknown. number ) . await ?;
247247 // Ignore None, we don't want to repeatedly hammer GitHub asking for the answer.
248- if issue . mergeable == Some ( false ) {
249- maybe_add_comment ( gh, & mut db, config, & issue , possibly. as_deref ( ) ) . await ?;
250- } else if issue . mergeable == None {
248+ if pr . mergeable == Some ( false ) {
249+ maybe_add_comment ( gh, & mut db, config, & pr , possibly. as_deref ( ) ) . await ?;
250+ } else if pr . mergeable == None {
251251 log:: info!( "unable to determine mergeable after delay for {unknown:?}" ) ;
252252 }
253253 }
0 commit comments