Skip to content

Commit 127920f

Browse files
committed
chore: improve attestationConfig typing in config.schema.json
1 parent f14d937 commit 127920f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

config.schema.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,14 @@
196196
},
197197
"links": {
198198
"type": "array",
199-
"items": { "type": "string", "format": "url" }
199+
"items": {
200+
"type": "object",
201+
"additionalProperties": false,
202+
"properties": {
203+
"text": { "type": "string" },
204+
"url": { "type": "string", "format": "url" }
205+
}
206+
}
200207
}
201208
},
202209
"required": ["text"]

src/config/generated/config.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,15 @@ export interface Question {
282282
* and used to provide additional guidance to the reviewer.
283283
*/
284284
export interface QuestionTooltip {
285-
links?: string[];
285+
links?: Link[];
286286
text: string;
287287
}
288288

289+
export interface Link {
290+
text?: string;
291+
url?: string;
292+
}
293+
289294
export interface AuthorisedRepo {
290295
name: string;
291296
project: string;
@@ -790,11 +795,18 @@ const typeMap: any = {
790795
),
791796
QuestionTooltip: o(
792797
[
793-
{ json: 'links', js: 'links', typ: u(undefined, a('')) },
798+
{ json: 'links', js: 'links', typ: u(undefined, a(r('Link'))) },
794799
{ json: 'text', js: 'text', typ: '' },
795800
],
796801
false,
797802
),
803+
Link: o(
804+
[
805+
{ json: 'text', js: 'text', typ: u(undefined, '') },
806+
{ json: 'url', js: 'url', typ: u(undefined, '') },
807+
],
808+
false,
809+
),
798810
AuthorisedRepo: o(
799811
[
800812
{ json: 'name', js: 'name', typ: '' },

0 commit comments

Comments
 (0)