File tree Expand file tree Collapse file tree 6 files changed +7
-24
lines changed
Expand file tree Collapse file tree 6 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ open Bot_info
44open Lwt.Infix
55open Lwt.Syntax
66open Utils
7- open Bot_info
87
98let report_status ?(mask = [] ) ?(stderr_content = " " ) command report code =
109 let stderr =
@@ -186,15 +185,3 @@ let github_repo_of_gitlab_url ~gitlab_mapping ~http_repo_url =
186185 github_full_name )
187186 in
188187 (owner, repo) )
189-
190- let init_git_bare_repository ~bot_info =
191- let * () = Lwt_io. printl " Initializing repository..." in
192- " git init --bare"
193- |&& f {| git config user.email " %s" | } bot_info.email
194- |&& f {| git config user.name " %s" | } bot_info.github_name
195- |> execute_cmd ~mask: [bot_info.github_pat]
196- >> = function
197- | Ok _ ->
198- Lwt_io. printl " Bare repository initialized."
199- | Error e ->
200- Lwt_io. printlf " Error while initializing bare repository: %s." e
Original file line number Diff line number Diff line change 11open Bot_components
2- open Git_utils
32open Base
43open Utils
54open Bot_components.Git_utils
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ open Cohttp_lwt_unix
44open Bot_components
55open Bot_components.GitHub_types
66open Bot_components.GitHub_GitLab_sync
7- open Bench_utils
87open String_utils
98open Utils
109open Bot_components.Git_utils
@@ -171,7 +170,7 @@ let handle_comment_created ~bot_info ~key ~app_id ~github_bot_name
171170 Bot_components.Github_installations. action_as_github_app ~bot_info
172171 ~key ~app_id ~owner: comment_info.issue.issue.owner
173172 (fun ~bot_info ->
174- run_bench ~bot_info ~repo_config_table
173+ Bench. run_bench ~bot_info ~repo_config_table
175174 ~key_value_pairs: [(" coq_native" , " yes" )]
176175 comment_info ) )
177176 |> Lwt. async ;
@@ -190,7 +189,7 @@ let handle_comment_created ~bot_info ~key ~app_id ~github_bot_name
190189 Bot_components.Github_installations. action_as_github_app ~bot_info
191190 ~key ~app_id ~owner: comment_info.issue.issue.owner
192191 (fun ~bot_info ->
193- run_bench ~bot_info ~repo_config_table comment_info ) )
192+ Bench. run_bench ~bot_info ~repo_config_table comment_info ) )
194193 |> Lwt. async ;
195194 Server. respond_string ~status: `OK
196195 ~body: (f " Received a request to start the bench." )
Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ github = "my-org/my-repo"
9696 let gitlab_instances = Hashtbl. create (module String ) in
9797 Hashtbl. set gitlab_instances ~key: " gitlab.com" ~data: (" test-bot" , " test-token" ) ;
9898 let bot_info =
99- { Bot_info. github_pat= " test-token"
100- ; github_install_token= None
99+ { Bot_info. github_install_token= Some " test-token"
101100 ; gitlab_instances
102101 ; github_name= " test-bot"
103102
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ let create_bot_info ~github_install_token =
8899 ; domain= " test.com"
1010 ; gitlab_instances= Hashtbl. create (module String )
11- ; app_id= 12345 }
11+ ; app_id= 12345
12+ ; api_timeout= 5.0 }
1213
1314let test_uses_github_app_token_when_available () =
1415 let bot_info =
Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ let create_mock_bot_info () =
88 let gitlab_instances = Hashtbl. create (module String ) in
99 Hashtbl. set gitlab_instances ~key: " gitlab.com"
1010 ~data: (" test-name" , " test-token" ) ;
11- { Bot_info. github_pat= " test-token"
12- ; github_install_token= None
11+ { Bot_info. github_install_token= None
1312 ; gitlab_instances
1413 ; github_name= " test-bot"
1514@@ -33,8 +32,7 @@ let create_real_bot_info () =
3332 | None ->
3433 () ) ;
3534 Some
36- { Bot_info. github_pat= token
37- ; github_install_token= None
35+ { Bot_info. github_install_token= Some token
3836 ; gitlab_instances
3937 ; github_name= " test-bot"
4038
You can’t perform that action at this time.
0 commit comments