Skip to content

[Schema Inaccuracy] Pull Request Files Changed blob_url, raw_url, and sha should be nullable #1945

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

Open
bigfootjon opened this issue Dec 5, 2022 · 1 comment

Comments

@bigfootjon
Copy link

bigfootjon commented Dec 5, 2022

Schema Inaccuracy

When a PR changes a submodule, the blob_url and raw_url are null, in some other cases that I can't pin down the sha field is null. However, the current schema marks these fields as non-nullable.

Expected

blob_url, raw_url, and sha in PR files changed responses should be marked as nullable.

Reproduction Steps

$ curl https://api.github.com/repos/pytorch/pytorch/pulls/89846/files

The above PR changes a submodule, the fields can be seen to be nullable there.

@bigfootjon bigfootjon changed the title [Schema Inaccuracy] Pull Request Files Changed blob_url and raw_url should be nullable [Schema Inaccuracy] Pull Request Files Changed blob_url, raw_url, and sha should be nullable Dec 19, 2022
@0xpablo
Copy link

0xpablo commented Feb 1, 2024

We are experiencing the same issue. This is a big problem on strongly typed languages like Swift where decoding will fail at runtime. We patched the spec manually but it would be great to get this fixed.

@becco becco added the feature label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants