trait Repositories extends Object
GitHub Repository API
- Annotations
- @RawJSType() @native()
- Alphabetic
- By Inheritance
- Repositories
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
branch(newBranchName: String, callback: GitHubCallback0): Unit
Create new branch (from master) for repo.
Create new branch (from master) for repo.
- newBranchName
the new branch name
- callback
the callback
-
def
branch(oldBranchName: String, newBranchName: String, callback: GitHubCallback0): Unit
Create new branch for repo.
Create new branch for repo. You can omit oldBranchName to default to "master".
- oldBranchName
the old branch name
- newBranchName
the new branch name
- callback
the callback
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
contents(branch: String, pathToDir: String, callback: GitHubCallback1[Array[Content]]): Unit
Get contents at a particular path in a particular branch.
Get contents at a particular path in a particular branch.
- branch
the desired branch (e.g. "master")
- pathToDir
the "path to" directory
- callback
the callback
-
def
contributors(callback: GitHubCallback1[Array[Contributor]]): Unit
Get contributors list with additions, deletions, and commit counts.
Get contributors list with additions, deletions, and commit counts.
- callback
the callback containing either an error or the array of contributors
-
def
createPullRequest(pull: Pull, callback: GitHubCallback1[PullRequest]): Unit
Create Pull Request.
Create Pull Request.
- pull
the Pull
- callback
the callback
-
def
createRef(refSpec: RefSpec, callback: GitHubCallback0): Unit
Create a new reference.
Create a new reference.
- refSpec
the RefSpec
- callback
the callback containing an error if one occurred
-
def
deleteRef(ref: String, callback: GitHubCallback0): Unit
Delete a reference.
Delete a reference.
- ref
the given reference name (e.g. "heads/gh-pages")
- callback
the callback containing an error if one occurred
repo.deleteRef('heads/gh-pages', function(err) {})
Example: -
def
deleteRepo(callback: GitHubCallback1[Resource]): Unit
Delete a repository
Delete a repository
- callback
the callback
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fork(callback: GitHubCallback0): Unit
Fork repository.
Fork repository. This operation runs asynchronously. You may want to poll for repo.contents until the forked repo is ready.
- callback
the callback
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getCommit(branch: String, sha: String, callback: GitHubCallback1[Commit]): Unit
Get information about a particular commit.
Get information about a particular commit.
- branch
the branch name (e.g. "master")
- sha
the SHA key
- callback
the callback containing either an error or the commit
-
def
getSha(branch: String, pathToFile: String, callback: GitHubCallback1[SHA]): Unit
- branch
the branch name (e.g. "master")
- pathToFile
the path to the file
- callback
the callback containing either an error or the SHA
-
def
getStatuses(sha: String, callback: GitHubCallback1[Array[CommitStatus]]): Unit
Get list of statuses for a particular commit.
Get list of statuses for a particular commit.
- sha
the SHA key
- callback
the callback containing either an error or the array of commit statuses
-
def
getTree(branch: String, callback: GitHubCallback1[Tree]): Unit
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.
- branch
the branch name (e.g. "master")
- callback
the callback containing either an error or the tree
repo.getTree('master', function(err, tree) {})
Example: -
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
isStarred(owner: String, repository: String, callback: GitHubCallback1[Boolean]): Unit
Check if a repository is starred.
Check if a repository is starred.
- owner
the owner
- repository
the repository
- callback
the completion callback
-
def
listBranches(callback: GitHubCallback1[Array[String]]): Unit
Retrieve all available branches (aka heads) of a repository.
Retrieve all available branches (aka heads) of a repository.
- callback
the callback
-
def
listForks(callback: GitHubCallback1[Array[Fork]]): Unit
List forks.
List forks.
- callback
the callback
-
def
listPulls(state: String, callback: GitHubCallback1[Array[PullRequest]]): Unit
List Pull Requests.
List Pull Requests.
- state
the state of the Pull Request ('open', 'closed' or 'all')
- callback
the callback
-
def
move(branch: String, pathToFile: String, pathToNewFile: String, callback: GitHubCallback0): Unit
Move a file from A to B.
Move a file from A to B.
- branch
the branch name
- pathToFile
the path to the file to be moved
- pathToNewFile
the new path to the file
- callback
the completion callback
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
read(branch: String, pathToFile: String, callback: GitHubCallback1[Any]): Unit
Reads stored content
Reads stored content
- branch
the branch name
- pathToFile
the path to the content
- callback
the callback
-
def
remove(branch: String, pathToFile: String, callback: GitHubCallback0): Unit
Remove a file.
Remove a file.
- branch
the branch name
- pathToFile
the path to the content
- callback
the completion callback
-
def
show(callback: Function2[GithubError, Repository, Any]): Unit
Show repository information
Show repository information
- callback
the callback
-
def
star(owner: String, repository: String, callback: GitHubCallback0): Unit
Star a repository.
Star a repository.
- owner
the owner
- repository
the repository name
- callback
the completion callback
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unstar(owner: String, repository: String, callback: GitHubCallback0): Unit
Unstar a repository.
Unstar a repository.
- owner
the owner
- repository
the repository name
- callback
the completion callback
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
write(branch: String, pathToFile: String, contents: String, commitMessage: String, options: RawOptions, callback: GitHubCallback0): Unit
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.
- branch
the branch name
- pathToFile
the path to the content
- contents
the user content
- commitMessage
the commit message
- options
the optional settings
- callback
the callback