An open-source entry in TopGit's GitHub warehouse: benweet/github, 4 stars, JavaScript. A higher-level wrapper around the Github API. Intended for the browser.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Github.js provides a minimal higher-level wrapper around git's plumbing commands, exposing an API for manipulating GitHub repositories on the file level. It is being developed in the context of Prose, a content editor for GitHub.
This repo is now officially maintained by DevelopmentSeed, the people behind Prose.io.
Installation
Either grab github.js from this repo or install via NPM:
npm install github-api
Usage
Create a Github instance.
var github = new Github({
username: "YOU_USER",
password: "YOUR_PASSWORD",
auth: "basic"
});
Or if you prefer OAuth, it looks like this:
var github = new Github({
token: "OAUTH_TOKEN",
auth: "oauth"
});
You can use either:
Authorised App Tokens (via client/secret pairs), used for bigger applications, created in web-flows/on the fly
Personal Access Tokens (simpler to set up), used on command lines, scripts etc, created in GitHub web UI
See these pages for more info:
Creating an access token for command-line use
[Github API OAuth Overview] (http://developer.github.com/v3/oauth)
Repository API
var repo = github.getRepo(username, reponame);
Show repository information
repo.show(function(err, repo) {});
Get contents at a particular path in a particular branch. Set sync to true to get contents via sync method.
Updating the contents of a Git. Please consult the documentation on GitHub.
var delta = {
"description": "the description for this gist",
"files": {
"file1.txt": {
"content": "updated file contents"
},
"old_name.txt": {
"filename": "new_name.txt",
"content": "modified contents"
},
"new_file.txt": {
"content": "a new file"
},
"delete_this_file.txt": null
}
};
gist.update(delta, function(err, gist) {
});
Issues API
var issues = github.getIssues(username, reponame);
To read all the issues of a given repository
issues.list(options, function(err, issues) {});
Tests
Github.js is automatically™ tested by the users of Prose. Because of that, we decided to save some time by not maintaining a test suite. Yes, you heard right. :) However, you can still consider it stable since it is used in production.
##Setup
Github.js has the following dependencies:
Underscore
Base64 (for basic auth). You can leave this if you are not using basic auth.
No homepage URL was recorded for benweet/github in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Is benweet/github open source?
Yes — benweet/github ships under the BSD-3-Clause license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/benweet/github.
What is benweet/github?
benweet/github (benweet/github) is a JavaScript project on GitHub. From the project's own README: A higher-level wrapper around the Github API. Intended for the browser.
What license does benweet/github use?
benweet/github is released under the BSD-3-Clause license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about benweet/github?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/benweet/github is the definitive source.
Read full README in the tab above.
Curious whether github is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about github.