@@ -3,7 +3,7 @@ use reqwest::header::{HeaderMap, HeaderValue, InvalidHeaderValue, AUTHORIZATION,
33use reqwest:: { blocking:: Client , blocking:: Response } ;
44use serde:: { Deserialize , Serialize } ;
55
6- use crate :: { parse_to_naive_date, Author , Commit , GitDate , BORS_AUTHOR } ;
6+ use crate :: { parse_to_naive_date, Author , Commit , GitDate , BORS_AUTHORS } ;
77
88#[ derive( Serialize , Deserialize , Debug ) ]
99struct GithubCommitComparison {
@@ -141,42 +141,44 @@ impl CommitsQuery<'_> {
141141
142142 // focus on Pull Request merges, all authored and committed by bors.
143143 let client = Client :: builder ( ) . default_headers ( headers ( ) ?) . build ( ) ?;
144- for page in 1 .. {
145- let url = CommitsUrl {
146- page,
147- author : BORS_AUTHOR ,
148- since : self . since_date ,
149- sha : self . most_recent_sha ,
150- }
151- . url ( ) ;
152-
153- let response: Response = client. get ( & url) . send ( ) ?;
154- let status = response. status ( ) ;
155- if !status. is_success ( ) {
156- bail ! (
157- "error: url <{}> response {}: {}" ,
158- url,
159- status,
160- response. text( ) . unwrap_or_else( |_| format!( "<empty>" ) )
161- ) ;
162- }
144+ for bors_author in BORS_AUTHORS {
145+ for page in 1 .. {
146+ let url = CommitsUrl {
147+ page,
148+ author : bors_author,
149+ since : self . since_date ,
150+ sha : self . most_recent_sha ,
151+ }
152+ . url ( ) ;
163153
164- let action = parse_paged_elems ( response, |elem : GithubCommitElem | {
165- let found_last = elem. sha == self . earliest_sha ;
166- if found_last {
167- eprintln ! (
168- "ending github query because we found starting sha: {}" ,
169- elem. sha
154+ let response: Response = client. get ( & url) . send ( ) ?;
155+ let status = response. status ( ) ;
156+ if !status. is_success ( ) {
157+ bail ! (
158+ "error: url <{}> response {}: {}" ,
159+ url,
160+ status,
161+ response. text( ) . unwrap_or_else( |_| format!( "<empty>" ) )
170162 ) ;
171163 }
172- let commit = elem. git_commit ( ) ?;
173- commits. push ( commit) ;
174164
175- Ok ( if found_last { Loop :: Break } else { Loop :: Next } )
176- } ) ?;
165+ let action = parse_paged_elems ( response, |elem : GithubCommitElem | {
166+ let found_last = elem. sha == self . earliest_sha ;
167+ if found_last {
168+ eprintln ! (
169+ "ending github query because we found starting sha: {}" ,
170+ elem. sha
171+ ) ;
172+ }
173+ let commit = elem. git_commit ( ) ?;
174+ commits. push ( commit) ;
175+
176+ Ok ( if found_last { Loop :: Break } else { Loop :: Next } )
177+ } ) ?;
177178
178- if let Loop :: Break = action {
179- break ;
179+ if let Loop :: Break = action {
180+ break ;
181+ }
180182 }
181183 }
182184
0 commit comments