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

Update file: handle case if no file exists at the path, or the response is something other than a file #42

Open
gr2m opened this issue Jun 16, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@gr2m
Copy link
Owner

gr2m commented Jun 16, 2020

See https://developer.github.com/v3/repos/contents/#get-repository-content

The GET /repos/:owner/:repo/contents/:path endpoint can have 4 different types of responses

  1. A file
  2. A directory
  3. A Symlink
  4. A Submodule

It can also respond with a 404 nothing exists at the given path.

We should probably throw errors for response types 2-4, and pass null to the function in case of a 404 response

See CONTRIBUTING.md for instructions on how to record fixtures for a new test, if needed

@gr2m gr2m added the help wanted Extra attention is needed label Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant