org.kohsuke.github
Class GHRepository

java.lang.Object
  extended by org.kohsuke.github.GHRepository

public class GHRepository
extends Object

A repository on GitHub.

Author:
Kohsuke Kawaguchi

Constructor Summary
GHRepository()
           
 
Method Summary
 void addCollaborators(Collection<GHUser> users)
           
 void addCollaborators(GHUser... users)
           
 void delete()
          Deletes this repository.
 boolean equals(Object obj)
           
 GHRepository fork()
          Forks this repository as your repository.
 GHRepository forkTo(GHOrganization org)
          Forks this repository into an organization.
 Set<GHUser> getCollaborators()
          Gets the collaborators on this repository.
 Date getCreatedAt()
           
 String getDescription()
           
 int getForks()
           
 String getHomepage()
           
 String getName()
           
 GHUser getOwner()
           
protected  String getOwnerName()
           
 Set<URL> getPostCommitHooks()
          Returns a set that represents the post-commit hook URLs.
 GHPullRequest getPullRequest(int i)
          Retrieves a specified pull request.
 List<GHPullRequest> getPullRequests(GHPullRequest.State state)
          Retrieves all the pull requests of a particular state.
 Date getPushedAt()
           
 String getUrl()
          URL of this repository, like 'http://github.com/kohsuke/hudson'
 int getWatchers()
           
 boolean hasDownloads()
           
 int hashCode()
           
 boolean hasIssues()
           
 boolean hasWiki()
           
 boolean isFork()
           
 boolean isPrivate()
           
 void removeCollaborators(Collection<GHUser> users)
           
 void removeCollaborators(GHUser... users)
           
 void renameTo(String newName)
          Rename this repository.
 void setEmailServiceHook(String address)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GHRepository

public GHRepository()
Method Detail

getDescription

public String getDescription()

getHomepage

public String getHomepage()

getUrl

public String getUrl()
URL of this repository, like 'http://github.com/kohsuke/hudson'


getName

public String getName()

getOwner

public GHUser getOwner()
                throws IOException
Throws:
IOException

getOwnerName

protected String getOwnerName()

hasIssues

public boolean hasIssues()

hasWiki

public boolean hasWiki()

isFork

public boolean isFork()

getForks

public int getForks()

isPrivate

public boolean isPrivate()

hasDownloads

public boolean hasDownloads()

getWatchers

public int getWatchers()

getPushedAt

public Date getPushedAt()

getCreatedAt

public Date getCreatedAt()

getCollaborators

public Set<GHUser> getCollaborators()
                             throws IOException
Gets the collaborators on this repository. This set always appear to include the owner.

Throws:
IOException

addCollaborators

public void addCollaborators(GHUser... users)
                      throws IOException
Throws:
IOException

addCollaborators

public void addCollaborators(Collection<GHUser> users)
                      throws IOException
Throws:
IOException

removeCollaborators

public void removeCollaborators(GHUser... users)
                         throws IOException
Throws:
IOException

removeCollaborators

public void removeCollaborators(Collection<GHUser> users)
                         throws IOException
Throws:
IOException

setEmailServiceHook

public void setEmailServiceHook(String address)
                         throws IOException
Throws:
IOException

delete

public void delete()
            throws IOException
Deletes this repository.

Throws:
IOException

fork

public GHRepository fork()
                  throws IOException
Forks this repository as your repository.

Returns:
Newly forked repository that belong to you.
Throws:
IOException

forkTo

public GHRepository forkTo(GHOrganization org)
                    throws IOException
Forks this repository into an organization.

Returns:
Newly forked repository that belong to you.
Throws:
IOException

renameTo

public void renameTo(String newName)
              throws IOException
Rename this repository.

Throws:
IOException

getPullRequest

public GHPullRequest getPullRequest(int i)
                             throws IOException
Retrieves a specified pull request.

Throws:
IOException

getPullRequests

public List<GHPullRequest> getPullRequests(GHPullRequest.State state)
                                    throws IOException
Retrieves all the pull requests of a particular state.

Throws:
IOException

getPostCommitHooks

public Set<URL> getPostCommitHooks()
Returns a set that represents the post-commit hook URLs. The returned set is live, and changes made to them are reflected to GitHub.


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.