Monorepo for Tangled
1{
2 "lexicon": 1,
3 "id": "sh.tangled.pipeline",
4 "needsCbor": true,
5 "needsType": true,
6 "defs": {
7 "main": {
8 "type": "record",
9 "key": "tid",
10 "record": {
11 "type": "object",
12 "required": [
13 "triggerMetadata",
14 "workflows"
15 ],
16 "properties": {
17 "triggerMetadata": {
18 "type": "ref",
19 "ref": "#triggerMetadata"
20 },
21 "workflows": {
22 "type": "array",
23 "items": {
24 "type": "ref",
25 "ref": "#workflow"
26 }
27 }
28 }
29 }
30 },
31 "triggerMetadata": {
32 "type": "object",
33 "required": [
34 "kind",
35 "repo"
36 ],
37 "properties": {
38 "kind": {
39 "type": "string",
40 "enum": [
41 "push",
42 "pull_request",
43 "manual"
44 ]
45 },
46 "repo": {
47 "type": "ref",
48 "ref": "#triggerRepo"
49 },
50 "push": {
51 "type": "ref",
52 "ref": "#pushTriggerData"
53 },
54 "pullRequest": {
55 "type": "ref",
56 "ref": "#pullRequestTriggerData"
57 },
58 "manual": {
59 "type": "ref",
60 "ref": "#manualTriggerData"
61 }
62 }
63 },
64 "triggerRepo": {
65 "type": "object",
66 "required": [
67 "knot",
68 "did",
69 "repoDid",
70 "repo",
71 "defaultBranch"
72 ],
73 "properties": {
74 "knot": {
75 "type": "string"
76 },
77 "did": {
78 "type": "string",
79 "format": "did"
80 },
81 "repoDid": {
82 "type": "string",
83 "description": "DID of the repo itself",
84 "format": "did"
85 },
86 "repo": {
87 "type": "string"
88 },
89 "defaultBranch": {
90 "type": "string"
91 }
92 }
93 },
94 "pushTriggerData": {
95 "type": "object",
96 "required": [
97 "ref",
98 "newSha",
99 "oldSha"
100 ],
101 "properties": {
102 "ref": {
103 "type": "string"
104 },
105 "newSha": {
106 "type": "string",
107 "minLength": 40,
108 "maxLength": 40
109 },
110 "oldSha": {
111 "type": "string",
112 "minLength": 40,
113 "maxLength": 40
114 }
115 }
116 },
117 "pullRequestTriggerData": {
118 "type": "object",
119 "required": [
120 "sourceBranch",
121 "targetBranch",
122 "sourceSha",
123 "action"
124 ],
125 "properties": {
126 "sourceBranch": {
127 "type": "string"
128 },
129 "targetBranch": {
130 "type": "string"
131 },
132 "sourceSha": {
133 "type": "string",
134 "minLength": 40,
135 "maxLength": 40
136 },
137 "action": {
138 "type": "string"
139 }
140 }
141 },
142 "manualTriggerData": {
143 "type": "object",
144 "properties": {
145 "inputs": {
146 "type": "array",
147 "items": {
148 "type": "ref",
149 "ref": "#pair"
150 }
151 }
152 }
153 },
154 "workflow": {
155 "type": "object",
156 "required": [
157 "name",
158 "engine",
159 "clone",
160 "raw"
161 ],
162 "properties": {
163 "name": {
164 "type": "string"
165 },
166 "engine": {
167 "type": "string"
168 },
169 "clone": {
170 "type": "ref",
171 "ref": "#cloneOpts"
172 },
173 "raw": {
174 "type": "string"
175 }
176 }
177 },
178 "cloneOpts": {
179 "type": "object",
180 "required": [
181 "skip",
182 "depth",
183 "submodules"
184 ],
185 "properties": {
186 "skip": {
187 "type": "boolean"
188 },
189 "depth": {
190 "type": "integer"
191 },
192 "submodules": {
193 "type": "boolean"
194 }
195 }
196 },
197 "pair": {
198 "type": "object",
199 "required": [
200 "key",
201 "value"
202 ],
203 "properties": {
204 "key": {
205 "type": "string"
206 },
207 "value": {
208 "type": "string"
209 }
210 }
211 }
212 }
213}