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

Response type for GET /repos/{owner}/{repo}/events missing ref and commits type for PushEvents #476

Open
stephenasuncionDEV opened this issue Oct 14, 2022 · 1 comment
Labels
Status: Blocked Blocked by GitHub's API or other external factors Type: Bug Something isn't working as documented, or is being fixed

Comments

@stephenasuncionDEV
Copy link

stephenasuncionDEV commented Oct 14, 2022

What happened?

I'm getting the recent commits from a branch through GET /repos/{owner}/{repo}/events, I'm filtering commits that were committed to the main branch and getting the latest one.

It looks like the payload type does not have ref and commits key in it.

export type listUserRepoEventsResponse = Endpoints["GET /repos/{owner}/{repo}/events"]["response"];

image

image

How to Fix

Probably need to add ref?: string inside the payload type

@stephenasuncionDEV stephenasuncionDEV added the Type: Bug Something isn't working as documented, or is being fixed label Oct 14, 2022
@stephenasuncionDEV stephenasuncionDEV changed the title Response type for GET /repos/{owner}/{repo}/events missing ref type for PushEvents Response type for GET /repos/{owner}/{repo}/events missing ref and commits type for PushEvents Oct 14, 2022
@wolfy1339
Copy link
Member

Similar to octokit/openapi-types.ts#232 and octokit/rest.js#128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Blocked Blocked by GitHub's API or other external factors Type: Bug Something isn't working as documented, or is being fixed
Projects
None yet
Development

No branches or pull requests

2 participants