|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kohsuke.github.GHRepository
public class GHRepository
A repository on GitHub.
| Constructor Summary | |
|---|---|
GHRepository()
|
|
| Method Summary | |
|---|---|
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 |
enableDownloads(boolean v)
|
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. Use getHooks() and createHook(String, Map, Collection, boolean) |
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 name)
Rename this repository. |
void |
setDescription(String value)
|
void |
setEmailServiceHook(String address)
|
void |
setHomepage(String value)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GHRepository()
| Method Detail |
|---|
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
IOException
public 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
IOException
public Set<String> getCollaboratorNames()
throws IOException
getCollaborators().
IOException
public Set<GHTeam> getTeams()
throws IOException
IOException
public void addCollaborators(GHUser... users)
throws IOException
IOException
public void addCollaborators(Collection<GHUser> users)
throws IOException
IOException
public void removeCollaborators(GHUser... users)
throws IOException
IOException
public void removeCollaborators(Collection<GHUser> users)
throws IOException
IOException
public void setEmailServiceHook(String address)
throws IOException
IOException
public void enableIssueTracker(boolean v)
throws IOException
IOException
public void enableWiki(boolean v)
throws IOException
IOException
public void enableDownloads(boolean v)
throws IOException
IOException
public void renameTo(String name)
throws IOException
IOException
public void setDescription(String value)
throws IOException
IOException
public void setHomepage(String value)
throws IOException
IOException
public void delete()
throws IOException
IOException
public GHRepository fork()
throws IOException
IOException
public GHRepository forkTo(GHOrganization org)
throws IOException
IOException
public GHPullRequest getPullRequest(int i)
throws IOException
IOException
public List<GHPullRequest> getPullRequests(GHIssueState state)
throws IOException
IOException
public List<GHHook> getHooks()
throws IOException
IOException
public GHHook getHook(int id)
throws IOException
IOException
public 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.
IOException
public GHHook createWebHook(URL url,
Collection<GHEvent> events)
throws IOException
IOException
public GHHook createWebHook(URL url)
throws IOException
IOExceptionpublic Set<URL> getPostCommitHooks()
getHooks() and createHook(String, Map, Collection, boolean)
public Map<String,GHBranch> getBranches()
throws IOException
IOException
public Map<Integer,GHMilestone> getMilestones()
throws IOException
IOException
public GHMilestone getMilestone(int number)
throws IOException
IOException
public GHMilestone createMilestone(String title,
String description)
throws IOException
IOExceptionpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||