Create new branch (from master) for repo.
Create new branch (from master) for repo.
the new branch name
the callback
Create new branch for repo.
Create new branch for repo. You can omit oldBranchName to default to "master".
the old branch name
the new branch name
the callback
Get contents at a particular path in a particular branch.
Get contents at a particular path in a particular branch.
the desired branch (e.g. "master")
the "path to" directory
the callback
Get contributors list with additions, deletions, and commit counts.
Get contributors list with additions, deletions, and commit counts.
the callback containing either an error or the array of contributors
Create Pull Request.
Create Pull Request.
the Pull
the callback
Create a new reference.
Create a new reference.
the RefSpec
the callback containing an error if one occurred
Delete a reference.
Delete a reference.
the given reference name (e.g. "heads/gh-pages")
the callback containing an error if one occurred
repo.deleteRef('heads/gh-pages', function(err) {})
Delete a repository
Delete a repository
the callback
Fork repository.
Fork repository. This operation runs asynchronously. You may want to poll for repo.contents until the forked repo is ready.
the callback
Get information about a particular commit.
Get information about a particular commit.
the branch name (e.g. "master")
the SHA key
the callback containing either an error or the commit
the branch name (e.g. "master")
the path to the file
the callback containing either an error or the SHA
Get list of statuses for a particular commit.
Get list of statuses for a particular commit.
the SHA key
the callback containing either an error or the array of commit statuses
Exploring files of a repository is easy too by accessing the top level tree object.
Exploring files of a repository is easy too by accessing the top level tree object.
the branch name (e.g. "master")
the callback containing either an error or the tree
repo.getTree('master', function(err, tree) {})
Check if a repository is starred.
Check if a repository is starred.
the owner
the repository
the completion callback
Retrieve all available branches (aka heads) of a repository.
Retrieve all available branches (aka heads) of a repository.
the callback
List forks.
List forks.
the callback
List Pull Requests.
List Pull Requests.
the state of the Pull Request ('open', 'closed' or 'all')
the callback
Move a file from A to B.
Move a file from A to B.
the branch name
the path to the file to be moved
the new path to the file
the completion callback
Reads stored content
Reads stored content
the branch name
the path to the content
the callback
Remove a file.
Remove a file.
the branch name
the path to the content
the completion callback
Show repository information
Show repository information
the callback
Star a repository.
Star a repository.
the owner
the repository name
the completion callback
Unstar a repository.
Unstar a repository.
the owner
the repository name
the completion callback
Store content at a certain path.
Store content at a certain path. If the file specified in the path exists, the content is updated. If the file doesn't exist, it's created on the fly. You can also provide an optional object literal, (options in the example below) containing information about the author and the committer.
the branch name
the path to the content
the user content
the commit message
the optional settings
the callback
GitHub Repository API