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<()> {
193193 . current_dir ( "rust" )
194194 . arg ( "fetch" )
195195 . arg ( "origin" )
196- . arg ( "master " )
196+ . arg ( "HEAD " )
197197 . status ( )
198- . context ( "git fetch origin master " ) ?;
198+ . context ( "git fetch origin HEAD " ) ?;
199199 assert ! ( status. success( ) , "git fetch successful" ) ;
200200 } else {
201201 let status = Command :: new ( "git" )
Original file line number Diff line number Diff line change @@ -647,6 +647,12 @@ pub mod github {
647647 pub head_commit : HeadCommit ,
648648 pub before : String ,
649649 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 ,
650656 }
651657
652658 #[ derive( Debug , Clone , Serialize , Deserialize ) ]
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ pub async fn handle_github(
2323
2424async fn handle_push ( ctxt : Arc < SiteCtxt > , push : github:: Push ) -> ServerResult < github:: Response > {
2525 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+ {
2729 return Ok ( github:: Response ) ;
2830 }
2931 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