Skip to content

Commit b89d763

Browse files
committed
Make all lib_test executables buildable.
1 parent 5b59671 commit b89d763

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

dune-project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
(name github)
33

44
(generate_opam_files true)
5+
(formatting disabled)
56

67
(license MIT)
78
(maintainers "Anil Madhavapeddy <anil@recoil.org>")
@@ -20,6 +21,7 @@
2021
(cohttp (>= 4.0.0))
2122
(cohttp-lwt-jsoo (>= 4.0.0))
2223
(lwt (>= 2.4.4))
24+
(cohttp-lwt (>= 4.0.0))
2325
(github-data (= :version))
2426
(yojson (>= 1.6.0))
2527
stringext)

github.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ depends: [
3131
"cohttp" {>= "4.0.0"}
3232
"cohttp-lwt-jsoo" {>= "4.0.0"}
3333
"lwt" {>= "2.4.4"}
34+
"cohttp-lwt" {>= "4.0.0"}
3435
"github-data" {= version}
3536
"yojson" {>= "1.6.0"}
3637
"stringext"

lib_test/dune

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,43 @@
11
(executables
22
(libraries cohttp-lwt-unix github_unix atdgen stringext cmdliner)
33
(names
4+
checks
5+
contributors
46
current_user
57
current_user_orgs
6-
organizations
8+
get_token
9+
issues
10+
labels
11+
milestones
712
organization_repos
8-
checks
9-
rwo
10-
get_token
11-
repo_info
12-
repo_stats
13-
contributors
14-
releases
15-
user_type))
13+
organizations
14+
pulls
15+
releases
16+
repo_info
17+
repo_stats
18+
rwo
19+
tags
20+
user_type))
1621

1722
(rule (copy config.ml.in config.ml))
1823

1924
(alias
2025
(name DEFAULT)
2126
(deps
27+
checks.exe
28+
contributors.exe
2229
current_user.exe
2330
current_user_orgs.exe
24-
organizations.exe
31+
get_token.exe
32+
issues.exe
33+
labels.exe
34+
milestones.exe
2535
organization_repos.exe
26-
checks.exe
27-
rwo.exe
28-
get_token.exe
29-
repo_info.exe
30-
repo_stats.exe
31-
releases.exe
32-
contributors.exe
33-
user_type.exe))
36+
organizations.exe
37+
pulls.exe
38+
releases.exe
39+
repo_info.exe
40+
repo_stats.exe
41+
rwo.exe
42+
tags.exe
43+
user_type.exe))

lib_test/labels.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ let t =
1010
let open Github_t in
1111
run (
1212
let labels = Label.for_repo ~token ~user ~repo () in
13+
printf "labels for %s/%s\n\n" user repo;
1314
Stream.iter (fun label ->
1415
let name = label.label_name in
15-
eprintf "label %s" name;
16+
printf "%s\n" name;
1617
return ()
1718
) labels
1819
)

lib_test/pulls.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
open Printf
22

3-
let token = None (* Some Config.access_token *)
3+
let token = Config.access_token
44

55
let print_pulls pl = Github.(Monad.(
66
Stream.iter (fun p ->
@@ -22,17 +22,17 @@ let t = Github.(Monad.(run (
2222
return (opam_repo_pulls ~state:`Closed ()) >>= print_pulls >>= fun () ->
2323
return (opam_repo_pulls ())
2424
>>= Stream.iter (fun hd ->
25-
Pull.get ?token ~user ~repo ~num:hd.Github_t.pull_number ()
25+
Pull.get ~token ~user ~repo ~num:hd.Github_t.pull_number ()
2626
>>~ fun p ->
2727
eprintf "Inside monad: pull %d: %s\n%!"
2828
p.Github_t.pull_number p.Github_t.pull_title;
29-
return (Pull.commits ?token ~user ~repo ~num:hd.Github_t.pull_number ())
29+
return (Pull.commits ~token ~user ~repo ~num:hd.Github_t.pull_number ())
3030
>>= Stream.iter (fun commit ->
3131
eprintf " %s\n" commit.Github_t.commit_sha; return ()
3232
)
3333
>>= fun () ->
3434
eprintf "---------\n%!";
35-
return (Pull.files ?token ~user ~repo ~num:hd.Github_t.pull_number ())
35+
return (Pull.files ~token ~user ~repo ~num:hd.Github_t.pull_number ())
3636
>>= Stream.iter (fun file ->
3737
eprintf " %s\n" file.Github_t.file_filename; return ()
3838
)

0 commit comments

Comments
 (0)