Skip to content

Commit 77d33b5

Browse files
committed
feat(models): add optional label to report.json schema
1 parent 61ee227 commit 77d33b5

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

packages/models/docs/models-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@ _Object containing the following properties:_
13311331
| **`plugins`** (\*) | | _Array of at least 1 [PluginReport](#pluginreport) items_ |
13321332
| `categories` | | _Array of [CategoryConfig](#categoryconfig) items_ |
13331333
| **`commit`** (\*) | Git commit for which report was collected | [Commit](#commit) (_nullable_) |
1334+
| `label` | Label (e.g. project name) | `string` |
13341335

13351336
_(\*) Required._
13361337

packages/models/src/lib/report.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const reportSchema = packageVersionSchema({
5252
commit: commitSchema
5353
.describe('Git commit for which report was collected')
5454
.nullable(),
55+
label: z.string().optional().describe('Label (e.g. project name)'),
5556
}),
5657
)
5758
.check(createCheck(findMissingSlugsInCategoryRefs))

packages/models/src/lib/report.unit.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ describe('reportSchema', () => {
207207
],
208208
packageName: 'cli',
209209
version: '1.0.1',
210+
label: 'api',
210211
} satisfies Report),
211212
).not.toThrow();
212213
});

0 commit comments

Comments
 (0)