Skip to content


Subversion checkout URL

You can clone with
Download ZIP


This library doesn't work with the Github API v3 #110

Pomax opened this Issue · 7 comments

5 participants


I tried running the following simple code:

var github = new Github({ token: ".....<keyhere>.....", auth: "oauth"});
var repo = github.getRepo("Pomax", "");
repo.contents("master", "gh-weblog/content", function(err, result) { console.warn(err); console.log(result); }, true);
repo.remove("master", "gh-weblog/content/2013-10-31-11-26-36.json", function(err, result) { console.log(err, result); });

But this generates one error after another. The path handling in remove is not in line with the v3 API, in browser context the global vars are getting set wrong:

  • _ ends up being unknown on line 407, despite underscore having loaded
  • XMLHttpRequest gets overwritten in function scope rather than using var XMLHTTPRequest = (typeof XMLHTTPRequest === "undefined" ? false : XMLHTTPRequest);)
  • Base64 is not necessary at all in browser context (the atob() function already exists)

Even fixing those things, I get errors that the update call to git/trees is missing sha values; dir entires should have sha values as well, so I removed the filter that takes them out, and then the github API still throws up errors, so there are some problems here that prevent github.js from being usable with the API v3.


Same experience here (there is a fix available for repo.contents, but didn't get repo.remove to work). I wonder if the michael is still maintaining this repo (last fixed issues are around 2 months ago). A statement on future plans from him would be nice. Is there a fork which is more up-to-date?


I'm currently using phil schatz' fork over at


I'd agree, would be nice to see some updates. I spent some time in Sep/Oct last year getting this lib to v0.9, but seemed to be the only one maintaining it. I think @michael had made someone at GitHub a maintainer, who promised to work on this and clear all issues, but nothing happened.

Would be a shame to let the repo die a slow death, but I think Michael is quite busy on Substance now and I wonder if that'll be the case? :-/

I'd be happy to work again on this repo and start clearing issues, but only if it were transferred to me. Bit less keen on working hugely on someone else's repo.


you might like to jump onto Phil's fork, then. It's being maintained, and PRs are getting accepted =)


Hey guys!

Sorry for being so unresponsive. I really can't promise when I have the time to look over the issues and pull requests. However when I do, I wanna do it properly. I don't have an active project that uses the Github API at the moment which makes it really difficult for me to verify the changes. It's also hard to identify a common set of features, since this lib was never intended to be a complete wrapper for the Github API. So as far as this repo goes I'd suggest to streamline the existing features, and keep them compatible with the latest official Github API's.

@mattpass You're very welcome to start clearing issues and merging in pull requests when they make sense to you. @jlord same applies to you. :) Thanks for the help!

-- Michael


maybe #105?


the PR for this landed, so technically it works for "v3", even if the library itself still doesn't work.

@Pomax Pomax closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.