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

Patch should be optional on PullRequestFile #180

Closed
lloydmeta opened this issue Dec 5, 2017 · 0 comments
Closed

Patch should be optional on PullRequestFile #180

lloydmeta opened this issue Dec 5, 2017 · 0 comments

Comments

@lloydmeta
Copy link
Contributor

Why

I think that field may not be populated, esp for binary files. This causes breakage when you try to get files on a pull request.

Proof

Assuming you have jq installed:

$ curl https://api.github.com/repos/scala/scala/pulls/4877/files | jq '. | map(select(.patch == null))'

[
  {
    "sha": "7229603ae5b30ce0e0bd09863543b260085c8f2d",
    "filename": "src/scaladoc/scala/tools/nsc/doc/html/resource/lib/arrow-down.png",
    "status": "removed",
    "additions": 0,
    "deletions": 0,
    "changes": 0,
    "blob_url": "https://github.com/scala/scala/blob/da3720e55b3d69cc31ab0f26e6cffafb18da360f/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/arrow-down.png",
    "raw_url": "https://github.com/scala/scala/raw/da3720e55b3d69cc31ab0f26e6cffafb18da360f/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/arrow-down.png",
    "contents_url": "https://api.github.com/repos/scala/scala/contents/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/arrow-down.png?ref=da3720e55b3d69cc31ab0f26e6cffafb18da360f"
  }, ...
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant