Skip to content

[BUG]: subscribers_count missing from repository properties #621

Open
@crs-k

Description

@crs-k

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

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented, or is being fixedType: SupportAny questions, information, or general needs around the SDK or GitHub APIs

    Type

    No type

    Projects

    Status

    🔥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions