this repo has no description
1opam-version: "2.0"
2maintainer: "sheets@alum.mit.edu"
3authors: [
4 "David Sheets"
5 "Thomas Gazagnaire"
6]
7homepage: "https://github.com/dsheets/ocaml-github-hooks"
8bug-reports: "https://github.com/dsheets/ocaml-github-hooks/issues"
9dev-repo: "git+https://github.com/dsheets/ocaml-github-hooks.git"
10doc: "https://dsheets.github.io/ocaml-github-hooks/"
11
12tags: [
13 "git"
14 "github"
15]
16
17build: [
18 ["jbuilder" "subst" "-p" name] {dev}
19 ["jbuilder" "build" "-p" name "-j" jobs]
20]
21
22depends: [
23 "ocaml" {>= "4.02.0"}
24 "jbuilder" {>= "1.0+beta9"}
25 "github-unix" {>= "3.0.1"}
26 "conduit-lwt-unix" {>= "1.0.0" & <"2.0.0"}
27 "github-hooks" {>= "0.2.0" & < "0.5.0"}
28 "cohttp-lwt-unix" {>= "0.99.0"}
29]
30synopsis: "GitHub API web hook listener library"
31description: """
32Library to create GitHub webhook server.
33
34### Web hook tests
35
36This repository contains a GitHub web hook test harness that confirms
37that ocaml-github can parse both polled and web-hook-received events and
38that the expected events are delivered in the correct order. To run the
39`test_hook_server` program, you must have a publicly accessible IP
40address with a DNS `A` record and a TLS certificate. You can use [Let's
41Encrypt](https://letsencrypt.org/) to get a TLS certificate for your
42domain for free. `test_hook_server` should be run from an account on the
43public-facing machine which also has agent access to an SSH key which is
44registered with GitHub. I recommend using a remote VM for the domain and
45forwarding a local ssh agent with something like `ssh -A example.net`.
46
47Once this is configured, place your TLS certificate in the file
48`webhook.crt` and the key for that certificate in
49`webhook.key`. Generate a personal GitHub token named `test` with `git
50jar make --scopes=admin:repo_hook,delete_repo,repo [GitHub token
51username] test` (with the `git-jar` subcommand from
52[mirage/ocaml-github](https://github.com/mirage/ocaml-github)) which has
53`admin:repo_hook`, `delete_repo`, and `repo` authority scopes. This
54token has quite a lot of authority so it is important to keep safe or
55use a test account rather than your primary GitHub account.
56
57Finally, run `make test` and then `_build/test/test_hook_server.native
58https://example.net:4433 [GitHub token username] test-github-hooks
59[GitHub SSH username]` to run the tests on your server at `example.net`
60on port `4433` as the user `[GitHub token username]` but git-pushing as the
61user `[GitHub SSH username]`. The test program will create and delete the
62repository `test-github-hooks` in the process of running. If the tests
63fail, you may have to remove the cloned repository called
64`test-github-hooks` and the GitHub repository `[GitHub token
65username]/test-github-hooks`."""
66url {
67 src:
68 "https://github.com/dsheets/ocaml-github-hooks/releases/download/0.2.0/github-hooks-0.2.0.tbz"
69 checksum: [
70 "sha256=df2784fb1306c0af0bd610f4515f336a085fd1b5c4c6a6f5fc9e345d7fab34cc"
71 "md5=9f3d6fac8bfb271f1193e347d29ca6db"
72 ]
73}