Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: subscribers_count missing from repository properties #621

Open
1 task done
crs-k opened this issue Mar 9, 2024 · 3 comments
Open
1 task done

[BUG]: subscribers_count missing from repository properties #621

crs-k opened this issue Mar 9, 2024 · 3 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented, or is being fixed Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@crs-k
Copy link

crs-k commented Mar 9, 2024

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
@crs-k crs-k added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented, or is being fixed labels Mar 9, 2024
Copy link
Contributor

github-actions bot commented Mar 9, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Mar 9, 2024
@nickfloyd nickfloyd added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Status: Triage This is being looked at and prioritized labels Mar 11, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Mar 12, 2024
@kfcampbell kfcampbell added the Status: Up for grabs Issues that are ready to be worked on by anyone label Mar 12, 2024
@steezplusplus
Copy link

Same issue with

"@octokit/rest": "^20.1.0",
"@octokit/types": "^12.6.0", 

@wolfy1339
Copy link
Member

The types are automatically generated from https://github.com/github/rest-api-description/

If this is still an issue, please check upstream as well and report it to them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented, or is being fixed Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

5 participants