File tree Expand file tree Collapse file tree 7 files changed +18
-25
lines changed
Expand file tree Collapse file tree 7 files changed +18
-25
lines changed Original file line number Diff line number Diff line change 11open Base
22open GitHub_types
3+ open Bot_info
34open Lwt.Infix
45open Lwt.Syntax
56open Utils
@@ -139,3 +140,15 @@ let%expect_test "http_repo_url_parsing_example_from_gitlab_docs" =
139140 {|
140141 GitLab domain : "gitlab.example.com"
141142 GitLab repository full name : "gitlab-org/gitlab-test" |}]
143+
144+ let init_git_bare_repository ~bot_info =
145+ let * () = Lwt_io. printl " Initializing repository..." in
146+ " git init --bare"
147+ |&& f {| git config user.email " %s" | } bot_info.email
148+ |&& f {| git config user.name " %s" | } bot_info.github_name
149+ |> execute_cmd ~mask: [bot_info.github_pat]
150+ >> = function
151+ | Ok _ ->
152+ Lwt_io. printl " Bare repository initialized."
153+ | Error e ->
154+ Lwt_io. printlf " Error while initializing bare repository: %s." e
Original file line number Diff line number Diff line change @@ -28,3 +28,5 @@ val pr_from_branch : string -> int option * string
2828
2929val parse_gitlab_repo_url :
3030 http_repo_url :string -> (string * string , string ) result
31+
32+ val init_git_bare_repository : bot_info :Bot_info .t -> unit Lwt .t
Original file line number Diff line number Diff line change 11open Bot_components
2+ open Git_utils
23open Base
34open Utils
45open Lwt.Infix
56open GitHub_types
67open Cohttp
78open Cohttp_lwt_unix
8- open Helpers
99
1010type artifact_info =
1111 | ArtifactInfo of
Original file line number Diff line number Diff line change 33 (public_name coq-bot.utils)
44 (libraries base bot-components coq-bot.config)
55 (wrapped false)
6- (modules bench coq helpers ))
6+ (modules bench coq))
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ open Cohttp_lwt_unix
44open Bot_components
55open Bot_components.GitHub_types
66open Bot_components.GitHub_GitLab_sync
7+ open Git_utils
78open Bench
8- open Helpers
99open String_utils
1010open Utils
1111open Lwt.Infix
You can’t perform that action at this time.
0 commit comments