Skip to content

Commit f4b44f3

Browse files
committed
fix: resolve compilation errors after rebase - remove github_pat references, add api_timeout, fix run_bench calls
1 parent f547742 commit f4b44f3

File tree

6 files changed

+7
-24
lines changed

6 files changed

+7
-24
lines changed

bot-components/Git_utils.ml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ open Bot_info
44
open Lwt.Infix
55
open Lwt.Syntax
66
open Utils
7-
open Bot_info
87

98
let 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

src/ci/minimization.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
open Bot_components
2-
open Git_utils
32
open Base
43
open Utils
54
open Bot_components.Git_utils

src/webhooks/github.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ open Cohttp_lwt_unix
44
open Bot_components
55
open Bot_components.GitHub_types
66
open Bot_components.GitHub_GitLab_sync
7-
open Bench_utils
87
open String_utils
98
open Utils
109
open 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.")

tests/generic_bot_demo_test.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
; email= "[email protected]"

tests/test_bot_info.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ let create_bot_info ~github_install_token =
88
; email= "[email protected]"
99
; domain= "test.com"
1010
; gitlab_instances= Hashtbl.create (module String)
11-
; app_id= 12345 }
11+
; app_id= 12345
12+
; api_timeout= 5.0 }
1213

1314
let test_uses_github_app_token_when_available () =
1415
let bot_info =

tests/test_helpers.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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
; email= "[email protected]"
@@ -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
; email= "[email protected]"

0 commit comments

Comments
 (0)