org.kohsuke.github
Class GHPullRequest

java.lang.Object
  extended by org.kohsuke.github.GHIssue
      extended by org.kohsuke.github.GHPullRequest

public class GHPullRequest
extends GHIssue

A pull request.

Author:
Kohsuke Kawaguchi
See Also:
GHRepository.getPullRequest(int)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kohsuke.github.GHIssue
GHIssue.Label, GHIssue.PullRequest
 
Field Summary
 
Fields inherited from class org.kohsuke.github.GHIssue
assignee, body, closed_at, closed_by, comments, created_at, html_url, id, labels, milestone, number, pull_request, state, title, updated_at, url, user
 
Constructor Summary
GHPullRequest()
           
 
Method Summary
 int getAdditions()
           
protected  String getApiRoute()
           
 GHCommitPointer getBase()
          This points to where the change should be pulled into, but I'm not really sure what exactly it means.
 int getChangedFiles()
           
 GHUser getClosedBy()
           
 int getDeletions()
           
 URL getDiffUrl()
          The diff file, like https://github.com/jenkinsci/jenkins/pull/100.diff
 GHCommitPointer getHead()
          The change that should be pulled.
 Date getIssueUpdatedAt()
          Deprecated. 
 URL getIssueUrl()
          The URL of the patch file.
 Collection<GHIssue.Label> getLabels()
           
 Boolean getMergeable()
           
 String getMergeableState()
           
 Date getMergedAt()
           
 GHUser getMergedBy()
           
 URL getPatchUrl()
          The URL of the patch file.
 GHIssue.PullRequest getPullRequest()
           
 int getReviewComments()
           
 boolean isMerged()
           
 PagedIterable<GHPullRequestCommitDetail> listCommits()
          Retrieves all the commits associated to this pull request.
 void merge(String msg)
          Merge this pull request.
 
Methods inherited from class org.kohsuke.github.GHIssue
assignTo, close, comment, getApiURL, getAssignee, getBody, getClosedAt, getComments, getCommentsCount, getCreatedAt, getMilestone, getNumber, getRepository, getState, getTitle, getUpdatedAt, getUrl, getUser, listComments, reopen, setBody, setLabels, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GHPullRequest

public GHPullRequest()
Method Detail

getApiRoute

protected String getApiRoute()
Overrides:
getApiRoute in class GHIssue

getPatchUrl

public URL getPatchUrl()
The URL of the patch file. like https://github.com/jenkinsci/jenkins/pull/100.patch


getIssueUrl

public URL getIssueUrl()
The URL of the patch file. like https://github.com/jenkinsci/jenkins/pull/100.patch


getBase

public GHCommitPointer getBase()
This points to where the change should be pulled into, but I'm not really sure what exactly it means.


getHead

public GHCommitPointer getHead()
The change that should be pulled. The tip of the commits to merge.


getIssueUpdatedAt

@Deprecated
public Date getIssueUpdatedAt()
Deprecated. 


getDiffUrl

public URL getDiffUrl()
The diff file, like https://github.com/jenkinsci/jenkins/pull/100.diff


getMergedAt

public Date getMergedAt()

getLabels

public Collection<GHIssue.Label> getLabels()
Overrides:
getLabels in class GHIssue

getClosedBy

public GHUser getClosedBy()
Overrides:
getClosedBy in class GHIssue

getPullRequest

public GHIssue.PullRequest getPullRequest()
Overrides:
getPullRequest in class GHIssue

getMergedBy

public GHUser getMergedBy()
                   throws IOException
Throws:
IOException

getReviewComments

public int getReviewComments()
                      throws IOException
Throws:
IOException

getAdditions

public int getAdditions()
                 throws IOException
Throws:
IOException

isMerged

public boolean isMerged()
                 throws IOException
Throws:
IOException

getMergeable

public Boolean getMergeable()
                     throws IOException
Throws:
IOException

getDeletions

public int getDeletions()
                 throws IOException
Throws:
IOException

getMergeableState

public String getMergeableState()
                         throws IOException
Throws:
IOException

getChangedFiles

public int getChangedFiles()
                    throws IOException
Throws:
IOException

listCommits

public PagedIterable<GHPullRequestCommitDetail> listCommits()
Retrieves all the commits associated to this pull request.


merge

public void merge(String msg)
           throws IOException
Merge this pull request. The equivalent of the big green "Merge pull request" button.

Parameters:
msg - Commit message. If null, the default one will be used.
Throws:
IOException


Copyright © 2014. All rights reserved.