public class GHRepository extends Object
| Constructor and Description |
|---|
GHRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCollaborators(Collection<GHUser> users) |
void |
addCollaborators(GHUser... users) |
GHHook |
createHook(String name,
Map<String,String> config,
Collection<GHEvent> events,
boolean active)
See https://api.github.com/hooks for possible names and their configuration scheme.
|
GHMilestone |
createMilestone(String title,
String description) |
GHHook |
createWebHook(URL url) |
GHHook |
createWebHook(URL url,
Collection<GHEvent> events) |
void |
delete()
Deletes this repository.
|
void |
enableIssueTracker(boolean v)
Enables or disables the issue tracker for this repository.
|
void |
enableWiki(boolean v)
Enables or disables Wiki for this repository.
|
boolean |
equals(Object obj) |
GHRepository |
fork()
Forks this repository as your repository.
|
GHRepository |
forkTo(GHOrganization org)
Forks this repository into an organization.
|
Map<String,GHBranch> |
getBranches()
Gets branches by their names.
|
Set<String> |
getCollaboratorNames()
Gets the names of the collaborators on this repository.
|
GHPersonSet<GHUser> |
getCollaborators()
Gets the collaborators on this repository.
|
GHCommit |
getCommit(String sha1)
Gets a commit object in this repository.
|
Date |
getCreatedAt() |
String |
getDescription() |
int |
getForks() |
String |
getGitTransportUrl()
Gets the git:// URL to this repository, such as "git://github.com/kohsuke/jenkins.git"
This URL is read-only.
|
String |
getHomepage() |
GHHook |
getHook(int id) |
List<GHHook> |
getHooks()
Retrieves the currently configured hooks.
|
List<GHIssue> |
getIssues(GHIssueState state) |
String |
getLanguage()
Gets the primary programming language.
|
String |
getMasterBranch()
Returns the primary branch you'll configure in the "Admin > Options" config page.
|
GHMilestone |
getMilestone(int number) |
Map<Integer,GHMilestone> |
getMilestones() |
String |
getName()
Short repository name without the owner.
|
int |
getOpenIssueCount() |
GHUser |
getOwner() |
protected String |
getOwnerName() |
Set<URL> |
getPostCommitHooks()
Deprecated.
|
GHPullRequest |
getPullRequest(int i)
Retrieves a specified pull request.
|
List<GHPullRequest> |
getPullRequests(GHIssueState state)
Retrieves all the pull requests of a particular state.
|
Date |
getPushedAt() |
int |
getSize() |
Set<GHTeam> |
getTeams()
If this repository belongs to an organization, return a set of teams.
|
String |
getUrl()
URL of this repository, like 'http://github.com/kohsuke/jenkins'
|
int |
getWatchers() |
String |
gitHttpTransportUrl()
Gets the HTTPS URL to this repository, such as "https://github.com/kohsuke/jenkins.git"
This URL is read-only.
|
boolean |
hasAdminAccess() |
boolean |
hasDownloads() |
int |
hashCode() |
boolean |
hasIssues() |
boolean |
hasPullAccess() |
boolean |
hasPushAccess() |
boolean |
hasWiki() |
boolean |
isFork() |
boolean |
isPrivate() |
PagedIterable<GHCommitComment> |
listCommitComments()
Lists up all the commit comments in this repository.
|
PagedIterable<GHCommit> |
listCommits()
Lists all the commits.
|
void |
removeCollaborators(Collection<GHUser> users) |
void |
removeCollaborators(GHUser... users) |
void |
renameTo(String newName)
Rename this repository.
|
void |
setEmailServiceHook(String address) |
String |
toString() |
public String getDescription()
public String getHomepage()
public String getUrl()
public String getGitTransportUrl()
public String gitHttpTransportUrl()
public String getName()
public boolean hasPullAccess()
public boolean hasPushAccess()
public boolean hasAdminAccess()
public String getLanguage()
public GHUser getOwner() throws IOException
IOExceptionpublic List<GHIssue> getIssues(GHIssueState state) throws IOException
IOExceptionprotected String getOwnerName()
public boolean hasIssues()
public boolean hasWiki()
public boolean isFork()
public int getForks()
public boolean isPrivate()
public boolean hasDownloads()
public int getWatchers()
public int getOpenIssueCount()
public Date getPushedAt()
public Date getCreatedAt()
public String getMasterBranch()
public int getSize()
@WithBridgeMethods(value=java.util.Set.class) public GHPersonSet<GHUser> getCollaborators() throws IOException
IOExceptionpublic Set<String> getCollaboratorNames() throws IOException
getCollaborators().IOExceptionpublic Set<GHTeam> getTeams() throws IOException
IOExceptionpublic void addCollaborators(GHUser... users) throws IOException
IOExceptionpublic void addCollaborators(Collection<GHUser> users) throws IOException
IOExceptionpublic void removeCollaborators(GHUser... users) throws IOException
IOExceptionpublic void removeCollaborators(Collection<GHUser> users) throws IOException
IOExceptionpublic void setEmailServiceHook(String address) throws IOException
IOExceptionpublic void enableIssueTracker(boolean v)
throws IOException
IOExceptionpublic void enableWiki(boolean v)
throws IOException
IOExceptionpublic void delete()
throws IOException
IOExceptionpublic GHRepository fork() throws IOException
IOExceptionpublic GHRepository forkTo(GHOrganization org) throws IOException
IOExceptionpublic void renameTo(String newName) throws IOException
IOExceptionpublic GHPullRequest getPullRequest(int i) throws IOException
IOExceptionpublic List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException
IOExceptionpublic List<GHHook> getHooks() throws IOException
IOExceptionpublic GHHook getHook(int id) throws IOException
IOExceptionpublic GHCommit getCommit(String sha1) throws IOException
IOExceptionpublic PagedIterable<GHCommit> listCommits()
public PagedIterable<GHCommitComment> listCommitComments()
public GHHook createHook(String name, Map<String,String> config, Collection<GHEvent> events, boolean active) throws IOException
name - Type of the hook to be created. See https://api.github.com/hooks for possible names.config - The configuration hash.events - Can be null. Types of events to hook into.IOExceptionpublic GHHook createWebHook(URL url, Collection<GHEvent> events) throws IOException
IOExceptionpublic GHHook createWebHook(URL url) throws IOException
IOExceptionpublic Set<URL> getPostCommitHooks()
public Map<String,GHBranch> getBranches() throws IOException
IOExceptionpublic Map<Integer,GHMilestone> getMilestones() throws IOException
IOExceptionpublic GHMilestone getMilestone(int number) throws IOException
IOExceptionpublic GHMilestone createMilestone(String title, String description) throws IOException
IOExceptionCopyright © 2012. All Rights Reserved.