File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
collector/src/compile/execute Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ fn checkout(artifact: &ArtifactId) -> anyhow::Result<()> {
193
193
. current_dir ( "rust" )
194
194
. arg ( "fetch" )
195
195
. arg ( "origin" )
196
- . arg ( "master " )
196
+ . arg ( "HEAD " )
197
197
. status ( )
198
- . context ( "git fetch origin master " ) ?;
198
+ . context ( "git fetch origin HEAD " ) ?;
199
199
assert ! ( status. success( ) , "git fetch successful" ) ;
200
200
} else {
201
201
let status = Command :: new ( "git" )
Original file line number Diff line number Diff line change @@ -647,6 +647,12 @@ pub mod github {
647
647
pub head_commit : HeadCommit ,
648
648
pub before : String ,
649
649
pub commits : Vec < Commit > ,
650
+ pub repository : Repository ,
651
+ }
652
+
653
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
654
+ pub struct Repository {
655
+ pub default_branch : String ,
650
656
}
651
657
652
658
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ pub async fn handle_github(
23
23
24
24
async fn handle_push ( ctxt : Arc < SiteCtxt > , push : github:: Push ) -> ServerResult < github:: Response > {
25
25
let gh_client = client:: Client :: from_ctxt ( & ctxt, RUST_REPO_GITHUB_API_URL . to_owned ( ) ) ;
26
- if push. r#ref != "refs/heads/master" || push. sender . login != "bors" {
26
+ if push. r#ref != format ! ( "refs/heads/{}" , push. repository. default_branch)
27
+ || push. sender . login != "bors"
28
+ {
27
29
return Ok ( github:: Response ) ;
28
30
}
29
31
let rollup_pr_number = match rollup_pr_number ( & gh_client, & push. head_commit . message ) . await ? {
You can’t perform that action at this time.
0 commit comments