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

Default to empty for getContent path? #137

Closed
bebraw opened this issue Mar 21, 2014 · 0 comments
Closed

Default to empty for getContent path? #137

bebraw opened this issue Mar 21, 2014 · 0 comments

Comments

@bebraw
Copy link

bebraw commented Mar 21, 2014

Looks like if getContent path is not set, then it will pass :path to GitHub and you receive a 404 as a result. It might make sense to default to an empty.

Demo:

github.repos.getContent({
    user: 'bebraw',
    repo: 'ghw'
    //path: '' // default to this to avoid 404
    }, function(err, res) {
        if(err) {
            return console.error(err);
        }

        console.log(res);
});
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