Open
Description
What happened?
Upgrading from 12.5.0 to 12.6.0 broke a few of my unit tests. Looking into the error, my mock response for rest.repos.get
no longer matches the properties of the repository
schema in octokit/types.ts
.
Looking at the example response here, the docs show that the subscribers_count
field still exists.
Which is correct?
Versions
"@actions/core": "1.10.1"
"@actions/github": "6.0.0"
"@octokit/plugin-paginate-rest": "10.0.0"
"@octokit/types": "12.6.0"
Relevant log output
391 subscribers_count: 42,
~~~~~~~~~~~~~~~~~
node_modules/@octokit/openapi-types/types.d.ts:15440:7
15440 parent?: components["schemas"]["repository"];
~~~~~~
The expected type comes from property 'parent' which is declared here on type '{ id: number; node_id: string; name: string; full_name: string; owner: { name?: string | null | undefined; email?: string | null | undefined; login: string; id: number; node_id: string; avatar_url: string; ... 14 more ...; starred_at?: string | undefined; }; ... 97 more ...; custom_properties?: { ...; } | undefined; }'
__mocks__/@actions/github.ts:508:7 - error TS2561: Object literal may only specify known properties, but 'subscribers_count' does not exist in type '{ id: number; node_id: string; name: string; full_name: string; license: { key: string; name: string; url: string | null; spdx_id: string | null; node_id: string; html_url?: string | undefined; } | null; ... 89 more ...; anonymous_access_enabled?: boolean | undefined; }'. Did you mean to write 'subscribers_url'?
508 subscribers_count: 42,
~~~~~~~~~~~~~~~~~
node_modules/@octokit/openapi-types/types.d.ts:15441:7
15441 source?: components["schemas"]["repository"];
~~~~~~
The expected type comes from property 'source' which is declared here on type '{ id: number; node_id: string; name: string; full_name: string; owner: { name?: string | null | undefined; email?: string | null | undefined; login: string; id: number; node_id: string; avatar_url: string; ... 14 more ...; starred_at?: string | undefined; }; ... 97 more ...; custom_properties?: { ...; } | undefined; }'
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🔥 Backlog