-
Notifications
You must be signed in to change notification settings - Fork 51
/
github.atd
1519 lines (1306 loc) · 36.3 KB
/
github.atd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
type error = {
resource: string;
?field: string option;
code: string;
?message: string option;
} <ocaml field_prefix="error_">
type message = {
message: string;
~errors <ocaml default="[]">: error list;
} <ocaml field_prefix="message_">
type rate = {
limit: int;
remaining: int;
reset: float;
} <ocaml field_prefix="rate_">
type rate_resources = {
core: rate;
search: rate;
} <ocaml field_prefix="rate_resources_">
type rate_limit = {
resources: rate_resources;
} <ocaml field_prefix="rate_limit_">
type scope = [
| User <json name="user">
| User_email <json name="user:email">
| User_follow <json name="user:follow">
| Public_repo <json name="public_repo">
| Repo <json name="repo">
| Repo_deployment <json name="repo_deployment">
| Repo_status <json name="repo:status">
| Delete_repo <json name="delete_repo">
| Notifications <json name="notifications">
| Gist <json name="gist">
| Read_repo_hook <json name="read:repo_hook">
| Write_repo_hook <json name="write:repo_hook">
| Admin_repo_hook <json name="admin:repo_hook">
| Admin_org_hook <json name="admin:org_hook">
| Read_org <json name="read:org">
| Write_org <json name="write:org">
| Admin_org <json name="admin:org">
| Read_public_key <json name="read:public_key">
| Write_public_key <json name="write:public_key">
| Admin_public_key <json name="admin:public_key">
| Unknown of string
] <json open_enum>
type app = {
name: string;
url: string;
} <ocaml field_prefix="app_">
type auth_req = {
~scopes: scope list;
note: string;
?note_url: string option;
?client_id: string option;
?client_secret: string option;
?fingerprint: string option;
} <ocaml field_prefix="auth_req_">
type auth = {
scopes: scope list;
token: string;
app: app;
url: string;
id: int <ocaml repr="int64">;
?note: string option;
?note_url: string option;
} <ocaml field_prefix="auth_">
type auths = auth list
type state = [
| Open <json name="open">
| Closed <json name="closed">
]
type new_issue = {
title: string;
?body: string option;
?assignee: string option;
?milestone: int option;
~labels: string list;
} <ocaml field_prefix="new_issue_">
type update_issue = {
?title: string option;
?body: string option;
?state: state option;
?assignee: string option;
?milestone: int option;
?labels: string list option;
} <ocaml field_prefix="update_issue_">
type issue_sort = [
| Created <json name="created">
| Updated <json name="updated">
| Comments <json name="comments">
| Unknown of string
] <json open_enum>
type direction = [
| Asc <json name="asc">
| Desc <json name="desc">
]
type user_type = [
| User <json name="User">
| Org <json name="Organization">
| Bot <json name="Bot">
]
type org = {
login: string;
id: int <ocaml repr="int64">;
url: string;
~ty <json name="type"> <ocaml default="`Org">: user_type;
?avatar_url: string option;
} <ocaml field_prefix="org_">
type orgs = org list
type user = {
inherit org;
~ty <json name="type"> <ocaml default="`User">: user_type;
} <ocaml field_prefix="user_">
type linked_user = {
html_url: string;
inherit user
} <ocaml field_prefix="linked_user_">
type linked_users = linked_user list
type commit_activity = {
days: int list;
total: int;
week: int
} <ocaml field_prefix="commit_activity_">
type commit_activities = commit_activity list
type contributor = {
contributions: int;
inherit linked_user
} <ocaml field_prefix="contributor_">
type contributors = contributor list
type code_frequency = int list
type code_frequencies = code_frequency list
type participation = {
all: int list;
owner: int list
} <ocaml field_prefix="participation_">
type punch_card = int list
type punch_cards = punch_card list
type user_info = {
?name: string option;
?company: string option;
?blog: string option;
?location: string option;
?email: string option;
~hireable: bool;
~bio: string;
~public_repos: int;
~public_gists: int;
~followers: int;
~following: int;
html_url: string;
created_at: string;
updated_at: string;
inherit linked_user
} <ocaml field_prefix="user_info_">
type organization = {
name: string; (* opt? *)
company: string; (* opt? *)
blog: string; (* opt? *)
location: string; (* opt? *)
email: string; (* opt? *)
public_repos: int;
public_gists: int;
followers: int;
following: int;
html_url: string;
created_at: string;
(*ty <json name="type">: org_type;*)
inherit org
} <ocaml field_prefix="organization_">
type team = {
url: string;
name: string;
id: int <ocaml repr="int64">;
} <ocaml field_prefix="team_">
type teams = team list
type team_permission = [
| Pull <json name="pull">
| Push <json name="push">
| Admin <json name="admin">
| Unknown of string
] <json open_enum>
type team_info = {
permission: team_permission;
members_count: int;
repos_count: int;
organization: org;
inherit team
} <ocaml field_prefix="team_info_">
type team_infos = team_info list
type base_label = {
name: string;
color: string;
} <ocaml field_prefix="base_label_">
type label = {
url: string;
inherit base_label
} <ocaml field_prefix="label_">
type labels = label list
type new_label = {
name: string;
color: string;
} <ocaml field_prefix="new_label_">
type label_names = string list
type milestone_sort = [
| Due_date <json name="due_date">
| Completeness <json name="completeness">
]
type new_milestone = {
title: string;
~state <ocaml default="`Open">: state;
?description: string option;
?due_on: string option;
} <ocaml field_prefix="new_milestone_">
type update_milestone = {
?title: string option;
?state: state option;
?description: string option;
?due_on: string option;
} <ocaml field_prefix="update_milestone_">
type milestone_reference = {
~title: string;
} <ocaml field_prefix="milestone_reference_">
type milestone = {
url: string;
number: int;
~state <ocaml default="`Open">: state;
~description: string;
?creator: user option;
open_issues: int;
closed_issues: int;
created_at: string;
?due_on: string option;
inherit milestone_reference
} <ocaml field_prefix="milestone_">
type milestones = milestone list
type issue = {
url: string;
html_url: string;
number: int;
~state <ocaml default="`Open">: state;
title: string;
~body: string;
user: user;
labels: label list;
~comments: int;
~created_at: string;
~updated_at: string;
?closed_at: string option;
?milestone: milestone option;
~sort <ocaml default="`Created">: issue_sort;
~direction <ocaml default="`Desc">: direction;
?mentioned: string list option;
?pull_request: pull_ref option;
} <ocaml field_prefix="issue_">
type issues = issue list
type comment = {
id: int <ocaml repr="int64">;
url: string;
html_url: string;
body: string;
user: user;
created_at: string;
updated_at: string;
} <ocaml field_prefix="comment_">
type issue_comment = {
inherit comment
} <ocaml field_prefix="issue_comment_">
type issue_comments = issue_comment list
type new_issue_comment = {
body: string;
} <ocaml field_prefix="new_issue_comment_">
type repo_commit = {
sha: string;
url: string;
} <ocaml field_prefix="repo_commit_">
type repo_tag = {
name: string;
commit: repo_commit;
zipball_url: string;
tarball_url: string;
} <ocaml field_prefix="repo_tag_">
type repo_tags = repo_tag list
type repo_branch = {
name: string;
commit: repo_commit;
} <ocaml field_prefix="repo_branch_">
type repo_branches = repo_branch list
type obj_type = [
| Blob <json name="blob">
| Tree <json name="tree">
| Commit <json name="commit">
| Tag <json name="tag">
]
type obj = {
ty <json name="type">: obj_type;
sha: string;
url: string;
} <ocaml field_prefix="obj_">
type git_ref = {
name <json name="ref">: string;
url: string;
obj <json name="object">: obj;
} <ocaml field_prefix="git_ref_">
type git_refs = git_ref list
type info = {
date: string;
email: string;
name: string;
} <ocaml field_prefix="info_">
type tag = {
obj <json name="object">: obj;
url: string;
sha: string;
tag: string;
message: string;
tagger: info;
} <ocaml field_prefix="tag_">
type git_commit = {
url: string;
author: info;
committer: info;
message: string;
} <ocaml field_prefix="git_commit_">
type commit = {
url: string;
sha: string;
git <json name="commit">: git_commit;
?author: user option; (* why? *)
?committer: user option; (* why? *)
} <ocaml field_prefix="commit_">
type commits = commit list
type repo = {
id: int <ocaml repr="int64">;
name: string;
url: string;
} <ocaml field_prefix="repo_">
type new_repo = {
name : string;
description : string;
homepage : string;
private : bool;
has_issues : bool;
has_wiki : bool;
has_downloads : bool;
team_id : int;
auto_init : bool;
?gitignore_template : string option;
?license_template : string option;
} <ocaml field_prefix="new_repo_">
type repository_permissions = {
admin: bool;
push: bool;
pull: bool
} <ocaml field_prefix="repository_permissions_">
type repository = {
owner: user;
full_name: string;
?description: string option;
~private: bool;
fork: bool;
html_url: string;
clone_url: string;
git_url: string;
ssh_url: string;
svn_url: string;
?mirror_url: string option;
~homepage: string;
?language: string option;
forks_count: int;
?subscribers_count: int option;
stargazers_count: int;
size: int;
?default_branch: string option;
open_issues_count: int;
?pushed_at: string option;
created_at: string;
updated_at: string;
?organization: user option;
has_issues: bool;
has_wiki: bool;
has_downloads: bool;
has_pages: bool;
?permissions: repository_permissions option;
inherit repo
} <ocaml field_prefix="repository_">
type repositories = repository list
type repository_search = {
total_count: int;
incomplete_results: bool;
items: repositories;
} <ocaml field_prefix="repository_search_">
type repository_issue_search = {
total_count: int;
incomplete_results: bool;
items: issues;
} <ocaml field_prefix="repository_issue_search_">
type branch = {
label: string nullable;
ref: string;
sha: string;
?user: user option;
?repo: repository option;
} <ocaml field_prefix="branch_">
type link = {
href: string;
}
type contribution_week = {
w: int;
a: int;
d: int;
c: int;
} <ocaml field_prefix="repo_contribution_week_">
type contributor_stats = {
author: user nullable;
total: int;
weeks: contribution_week list;
} <ocaml field_prefix="repo_contributor_stats_">
type contributors_stats = contributor_stats list
type pull_links = {
self: link;
html: link;
comments: link;
review_comments: link;
} <ocaml field_prefix="pull_">
type pull_ref = {
url: string;
html_url: string;
diff_url: string;
patch_url: string;
} <ocaml field_prefix="pull_ref_">
type pull = {
issue_url: string;
number: int;
~state <ocaml default="`Open">: state;
title: string;
~body: string;
created_at: string;
updated_at: string;
?closed_at: string option;
?merged_at: string option;
head: branch;
base: branch;
links <json name="_links">: pull_links;
user: user;
?merge_commit_sha: string option;
inherit pull_ref
} <ocaml field_prefix="pull_">
type pulls = pull list
type new_pull = {
title: string;
?body: string option;
base: string;
head: string;
} <ocaml field_prefix="new_pull_">
type new_pull_issue = {
issue: int;
base: string;
head: string;
} <ocaml field_prefix="new_pull_issue_">
type update_pull = {
?title: string option;
?body: string option;
?state: state option;
?base: string option;
} <ocaml field_prefix="update_pull_">
type commit_comment = {
?position: int option;
?line: int option;
?path: string option;
commit_id: string;
inherit comment
} <ocaml field_prefix="commit_comment_">
type commit_comment_event = {
comment: commit_comment;
} <ocaml field_prefix="commit_comment_event_">
type ref = [
| Repository <json name="repository">
| Branch <json name="branch"> of string
| Tag <json name="tag"> of string
]
type create_event = {
ref: ref;
master_branch: string;
?description: string option;
(* pusher_type *)
} <ocaml field_prefix="create_event_">
<json adapter.ocaml="Github_json.Adapter.Ref">
type delete_event = {
ref: ref;
(* pusher_type *)
} <ocaml field_prefix="delete_event_">
<json adapter.ocaml="Github_json.Adapter.Ref">
type fork_event = {
forkee: repository;
} <ocaml field_prefix="fork_event_">
type wiki_page_action = [
| Created <json name="created">
| Edited <json name="edited">
| Unknown of string
] <json open_enum>
type wiki_page = {
name <json name="page_name">: string;
title: string;
action: wiki_page_action;
sha: string;
html_url: string;
} <ocaml field_prefix="wiki_page_">
type gollum_event = {
pages: wiki_page list;
} <ocaml field_prefix="gollum_event_">
type repo_issues_action = [
| Closed <json name="closed">
| Reopened <json name="reopened">
| Subscribed <json name="subscribed">
| Merged <json name="merged">
| Referenced <json name="referenced">
| Mentioned <json name="mentioned">
| Assigned <json name="assigned">
| Unassigned <json name="unassigned">
| Labeled <json name="labeled">
| Unlabeled <json name="unlabeled">
| Milestoned <json name="milestoned">
| Demilestoned <json name="demilestoned">
| Renamed <json name="renamed">
| Locked <json name="locked">
| Unlocked <json name="unlocked">
| Head_ref_deleted <json name="head_ref_deleted">
| Head_ref_restored <json name="head_ref_restored">
| Unknown of string
] <json open_enum>
type issue_rename = {
from: string;
to: string;
} <ocaml field_prefix="issue_rename_">
type repo_issue_event = {
id: int;
url: string;
?actor: linked_user option;
event: repo_issues_action;
created_at: string;
?label: base_label option;
?assignee: linked_user option;
?assigner: linked_user option;
?milestone: milestone_reference option;
?rename: issue_rename option;
} <ocaml field_prefix="repo_issue_event_">
type repo_issues_event = {
issue: issue;
inherit repo_issue_event
} <ocaml field_prefix="repo_issues_event_">
type repo_issues_events = repo_issues_event list
type repo_issue_events = repo_issue_event list
type change = {
from: string;
} <ocaml field_prefix="change_">
type body_changes = {
?body: change option;
} <ocaml field_prefix="body_changes_">
type ticket_changes = {
?title: change option;
inherit body_changes
} <ocaml field_prefix="ticket_changes_">
type issue_comment_action = [
| Created <json name="created">
| Edited <json name="edited"> of body_changes
| Deleted <json name="deleted">
| Unknown of (string * t nullable)
]
type issue_comment_event = {
action <json name="changes">: issue_comment_action;
issue: issue;
comment: issue_comment;
} <ocaml field_prefix="issue_comment_event_">
<json adapter.ocaml="Github_json.Adapter.Issue_comment_event">
type issues_action = [
| Assigned <json name="assigned">
| Unassigned <json name="unassigned">
| Labeled <json name="labeled">
| Unlabeled <json name="unlabeled">
| Opened <json name="opened">
| Edited <json name="edited"> of ticket_changes
| Closed <json name="closed">
| Reopened <json name="reopened">
| Unknown of (string * t nullable)
]
type issues_event = {
action <json name="changes">: issues_action;
issue: issue;
?assignee: user_info option;
?label: label option;
} <ocaml field_prefix="issues_event_">
<json adapter.ocaml="Github_json.Adapter.Issues_event">
type member_action = [
| Added <json name="added">
| Unknown of string
] <json open_enum>
type member_event = {
action: member_action;
member: linked_user;
} <ocaml field_prefix="member_event_">
(* TODO: this could use constr + optional support *)
type page_build_error = {
?message: string option;
} <ocaml field_prefix="page_build_error_">
type page_build_status = [
| Building <json name="building">
| Built <json name="built">
| Errored <json name="errored">
| Unknown of string
] <json open_enum>
type page_build = {
url: string;
?status: page_build_status option;
error: page_build_error;
} <ocaml field_prefix="page_build_">
type page_build_event = {
build: page_build;
} <ocaml field_prefix="page_build_event_">
type pull_request_action = [
| Assigned <json name="assigned">
| Unassigned <json name="unassigned">
| Labeled <json name="labeled">
| Unlabeled <json name="unlabeled">
| Opened <json name="opened">
| Edited <json name="edited"> of ticket_changes
| Closed <json name="closed">
| Reopened <json name="reopened">
| Synchronize <json name="synchronize">
| Unknown of (string * t nullable)
]
type pull_request_event = {
action <json name="changes">: pull_request_action;
number: int;
pull_request: pull;
} <ocaml field_prefix="pull_request_event_">
<json adapter.ocaml="Github_json.Adapter.Pull_request_event">
type pull_request_review_comment_action = [
| Created <json name="created">
| Edited <json name="edited"> of body_changes
| Deleted <json name="deleted">
| Unknown of (string * t nullable)
]
type pull_request_review_comment = {
diff_hunk: string;
original_position: int;
original_commit_id: string;
pull_request_url: string;
inherit commit_comment
} <ocaml field_prefix="pull_request_review_comment_">
type pull_request_review_comment_event = {
action <json name="changes">: pull_request_review_comment_action;
pull_request: pull;
comment: pull_request_review_comment;
} <ocaml field_prefix="pull_request_review_comment_event_">
<json adapter.ocaml="Github_json.Adapter.Pull_request_review_comment_event">
type push_event_author = {
name: string;
email: string;
} <ocaml field_prefix="push_event_author_">
type push_event_commit_base = {
url: string;
message: string;
author: push_event_author;
distinct: bool;
} <ocaml field_prefix="push_event_commit_base_">
type push_event_hook_commit = {
id: string;
tree_id: string;
inherit push_event_commit_base
} <ocaml field_prefix="push_event_hook_commit_">
type push_event_commit = {
sha: string;
inherit push_event_commit_base
} <ocaml field_prefix="push_event_commit_">
type push_event_base = {
ref: string;
before: string;
} <ocaml field_prefix="push_event_base_">
type push_event = {
head: string;
size: int;
commits: push_event_commit list;
inherit push_event_base
} <ocaml field_prefix="push_event_">
type push_event_hook = {
after: string;
created: bool;
deleted: bool;
forced: bool;
commits: push_event_hook_commit list;
head_commit: push_event_hook_commit nullable;
inherit push_event_base
} <ocaml field_prefix="push_event_hook_">
type release_action = [
| Published <json name="published">
| Unknown of string
] <json open_enum>
type release_event = {
action: release_action;
release: release;
} <ocaml field_prefix="release_event_">
type repository_action = [
| Created <json name="created">
| Deleted <json name="deleted">
| Publicized <json name="publicized">
| Privatized <json name="privatized">
| Unknown of string
] <json open_enum>
type repository_event = {
action: repository_action;
repository: repository;
} <ocaml field_prefix="repository_event_">
type status_branch_commit = {
sha: string;
url: string;
} <ocaml field_prefix="status_branch_commit_">
type status_branch = {
name: string;
commit: status_branch_commit;
} <ocaml field_prefix="status_branch_">
type status_event = {
sha: string;
(* name *)
?target_url: string option;
?context : string option;
?description: string option;
state: status_state;
commit: commit;
branches: status_branch list;
(* created_at *)
(* updated_at *)
} <ocaml field_prefix="status_event_">
type team_add_info = {
slug: string;
permission: team_permission;
members_url: string;
repositories_url: string;
inherit team
} <ocaml field_prefix="team_add_info_">
type team_add_event = {
?team: team_add_info option;
?user: user option;
?repository: repository option;
organization: org;
} <ocaml field_prefix="team_add_event_">
type watch_action = [
| Started <json name="started">
| Unknown of string
] <json open_enum>
type watch_event = {
action: watch_action;
} <ocaml field_prefix="watch_event_">
type last_response = {
code: string nullable;
status: string;
message: string nullable;
} <ocaml field_prefix="last_response_">
type ping_event_hook_config = {
content_type: string;
insecure_ssl: string;
url: string;
} <ocaml field_prefix="ping_event_hook_config_">
type ping_event_hook = {
ping_type <json name="type"> : string;
id: int;
name: string;
active: bool;
events: string list;
config: ping_event_hook_config;
updated_at: string;
created_at: string;
url: string;
test_url: string;
ping_url: string;
deliveries_url: string;
last_response: last_response;
} <ocaml field_prefix="ping_event_hook_">
type ping_event = {
zen: string;
hook_id: int;
hook: ping_event_hook;
repository: repository;
sender: user;
} <ocaml field_prefix="ping_event_">
type file = {
?sha: string option; (* e.g. if status is 'renamed', this is None *)
filename: string;
status: string; (* TODO: variant? at least "added" *)
additions: int;
deletions: int;
changes: int;
blob_url: string;
raw_url: string;
?patch: string option;
} <ocaml field_prefix="file_">
type files = file list
type merge_request = {
?commit_message: string option;
} <ocaml field_prefix="merge_">
type merge = {
?sha: string option;
merged: bool;
message: string;
} <ocaml field_prefix="merge_">
type event_type = [
| CommitComment <json name="commit_comment">
| Create <json name="create">
| Delete <json name="delete">
| Deployment <json name="deployment">
| DeploymentStatus <json name="deployment_status">
| Download <json name="download">
| Follow <json name="follow">
| Fork <json name="fork">
| ForkApply <json name="fork_apply">
| Gist <json name="gist">
| Gollum <json name="gollum">
| IssueComment <json name="issue_comment">
| Issues <json name="issues">
| Member <json name="member">
| PageBuild <json name="page_build">
| Ping <json name="ping">
| Public <json name="public">
| PullRequest <json name="pull_request">
| PullRequestReviewComment <json name="pull_request_review_comment">
| Push <json name="push">
| Release <json name="release">
| Repository <json name="repository">
| Status <json name="status">
| TeamAdd <json name="team_add">
| Watch <json name="watch">
| All <json name="*">
| Unknown of string
] <json open_enum>
type event_constr = [
| CommitComment <json name="CommitCommentEvent"> of commit_comment_event
| Create <json name="CreateEvent"> of create_event
| Delete <json name="DeleteEvent"> of delete_event
(*| Deployment <json name="deployment"> of *)
(*| DeploymentStatus <json name="deployment_status"> of *)
| Download <json name="DownloadEvent">
(* Deprecated but there may be a payload object... *)
| Follow <json name="FollowEvent">
(* Deprecated but there may be a payload object... *)
| Fork <json name="ForkEvent"> of fork_event
| ForkApply <json name="ForkApplyEvent">
(* Deprecated but there may be a payload object... *)
| Gist <json name="GistEvent">
(* Deprecated but there may be a payload object... *)
| Gollum <json name="GollumEvent"> of gollum_event
| IssueComment <json name="IssueCommentEvent"> of issue_comment_event
| Issues <json name="IssuesEvent"> of issues_event
| Member <json name="MemberEvent"> of member_event
(*| PageBuild <json name="page_build"> of page_build_event*)
| Public <json name="PublicEvent">