Monorepo for Tangled
1{
2 "lexicon": 1,
3 "id": "sh.tangled.git.refUpdate",
4 "defs": {
5 "main": {
6 "type": "record",
7 "description": "An update to a git repository, emitted by knots.",
8 "key": "tid",
9 "record": {
10 "type": "object",
11 "required": [
12 "ref",
13 "committerDid",
14 "repoName",
15 "oldSha",
16 "newSha",
17 "meta"
18 ],
19 "properties": {
20 "ref": {
21 "type": "string",
22 "description": "Ref being updated",
23 "maxGraphemes": 256,
24 "maxLength": 2560
25 },
26 "committerDid": {
27 "type": "string",
28 "description": "did of the user that pushed this ref",
29 "format": "did"
30 },
31 "ownerDid": {
32 "type": "string",
33 "description": "did of the owner of the repo",
34 "format": "did"
35 },
36 "repoDid": {
37 "type": "string",
38 "description": "DID of the repo itself",
39 "format": "did"
40 },
41 "repoName": {
42 "type": "string",
43 "description": "name of the repo"
44 },
45 "oldSha": {
46 "type": "string",
47 "description": "old SHA of this ref",
48 "minLength": 40,
49 "maxLength": 40
50 },
51 "newSha": {
52 "type": "string",
53 "description": "new SHA of this ref",
54 "minLength": 40,
55 "maxLength": 40
56 },
57 "meta": {
58 "type": "ref",
59 "ref": "#meta"
60 }
61 }
62 }
63 },
64 "meta": {
65 "type": "object",
66 "required": ["isDefaultRef", "commitCount"],
67 "properties": {
68 "isDefaultRef": {
69 "type": "boolean",
70 "default": false
71 },
72 "langBreakdown": {
73 "type": "ref",
74 "ref": "#langBreakdown"
75 },
76 "commitCount": {
77 "type": "ref",
78 "ref": "#commitCountBreakdown"
79 }
80 }
81 },
82 "langBreakdown": {
83 "type": "object",
84 "properties": {
85 "inputs": {
86 "type": "array",
87 "items": {
88 "type": "ref",
89 "ref": "#individualLanguageSize"
90 }
91 }
92 }
93 },
94 "individualLanguageSize": {
95 "type": "object",
96 "required": ["lang", "size"],
97 "properties": {
98 "lang": {
99 "type": "string"
100 },
101 "size": {
102 "type": "integer"
103 }
104 }
105 },
106 "commitCountBreakdown": {
107 "type": "object",
108 "required": [],
109 "properties": {
110 "byEmail": {
111 "type": "array",
112 "items": {
113 "type": "ref",
114 "ref": "#individualEmailCommitCount"
115 }
116 }
117 }
118 },
119 "individualEmailCommitCount": {
120 "type": "object",
121 "required": ["email", "count"],
122 "properties": {
123 "email": {
124 "type": "string"
125 },
126 "count": {
127 "type": "integer"
128 }
129 }
130 }
131 }
132}