org.jenkinsci.plugins.ghprb
Class GhprbPullRequest

java.lang.Object
  extended by org.jenkinsci.plugins.ghprb.GhprbPullRequest

public class GhprbPullRequest
extends Object

Maintains state about a Pull Request for a particular Jenkins job. This is what understands the current state of a PR for a particular job.

Author:
Honza Brázdil

Constructor Summary
GhprbPullRequest(org.kohsuke.github.GHPullRequest pr, Ghprb ghprb, GhprbRepository repo, boolean isNew)
           
 
Method Summary
 void check(org.kohsuke.github.GHIssueComment comment)
           
 void check(org.kohsuke.github.GHPullRequest ghpr)
          Checks this Pull Request representation against a GitHub version of the Pull Request, and triggers a build if necessary.
 boolean checkMergeable()
           
 boolean equals(Object obj)
           
 String getAuthorEmail()
          Email address is collected from GitHub as extra information, so lets cache it.
 String getAuthorRepoGitUrl()
           
 org.kohsuke.github.GitUser getCommitAuthor()
           
 String getDescription()
          The description body is part of the PullRequest object
 String getHead()
           
 int getId()
           
 org.kohsuke.github.GHPullRequest getPullRequest(boolean force)
          Get the PullRequest object for this PR
 org.kohsuke.github.GHUser getPullRequestAuthor()
          Author is part of the PullRequest Object
 String getSource()
          Head and Ref are part of the PullRequest object
 String getTarget()
          Base and Ref are part of the PullRequest object
 String getTitle()
          Title is part of the PullRequest object
 URL getUrl()
          Returns the URL to the Github Pull Request.
 int hashCode()
           
 void init(Ghprb helper, GhprbRepository repo)
           
 boolean isChanged()
           
 boolean isMergeable()
           
 boolean isWhiteListedTargetBranch()
           
 void save()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GhprbPullRequest

public GhprbPullRequest(org.kohsuke.github.GHPullRequest pr,
                        Ghprb ghprb,
                        GhprbRepository repo,
                        boolean isNew)
Method Detail

init

public void init(Ghprb helper,
                 GhprbRepository repo)

check

public void check(org.kohsuke.github.GHPullRequest ghpr)
Checks this Pull Request representation against a GitHub version of the Pull Request, and triggers a build if necessary.

Parameters:
ghpr -

check

public void check(org.kohsuke.github.GHIssueComment comment)

isWhiteListedTargetBranch

public boolean isWhiteListedTargetBranch()

checkMergeable

public boolean checkMergeable()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getId

public int getId()

getHead

public String getHead()

getAuthorRepoGitUrl

public String getAuthorRepoGitUrl()

isMergeable

public boolean isMergeable()

getTarget

public String getTarget()
Base and Ref are part of the PullRequest object

Returns:

getSource

public String getSource()
Head and Ref are part of the PullRequest object

Returns:

getTitle

public String getTitle()
Title is part of the PullRequest object

Returns:

getUrl

public URL getUrl()
           throws IOException
Returns the URL to the Github Pull Request. This URL is part of the pull request object

Returns:
the Github Pull Request URL
Throws:
IOException

getDescription

public String getDescription()
The description body is part of the PullRequest object

Returns:

getCommitAuthor

public org.kohsuke.github.GitUser getCommitAuthor()

getPullRequestAuthor

public org.kohsuke.github.GHUser getPullRequestAuthor()
                                               throws IOException
Author is part of the PullRequest Object

Returns:
Throws:
IOException

getPullRequest

public org.kohsuke.github.GHPullRequest getPullRequest(boolean force)
                                                throws IOException
Get the PullRequest object for this PR

Parameters:
force - - forces the code to go get the PullRequest from GitHub now
Returns:
Throws:
IOException

getAuthorEmail

public String getAuthorEmail()
Email address is collected from GitHub as extra information, so lets cache it.

Returns:

isChanged

public boolean isChanged()

save

public void save()


Copyright © 2004-2016. All Rights Reserved.