Class PullRequestSCMHead

java.lang.Object
jenkins.scm.api.SCMHead
org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead
All Implemented Interfaces:
Serializable, Comparable<jenkins.scm.api.SCMHead>, jenkins.scm.api.mixin.ChangeRequestSCMHead, jenkins.scm.api.mixin.ChangeRequestSCMHead2, jenkins.scm.api.mixin.SCMHeadMixin
Direct Known Subclasses:
PullRequestSCMHead.FixMetadata, PullRequestSCMHead.FixOrigin

public class PullRequestSCMHead extends jenkins.scm.api.SCMHead implements jenkins.scm.api.mixin.ChangeRequestSCMHead2
Head corresponding to a pull request. Named like PR-123 or PR-123-merge or PR-123-head.
See Also:
  • Constructor Details

    • PullRequestSCMHead

      public PullRequestSCMHead(@NonNull String name, String sourceOwner, String sourceRepo, String sourceBranch, int number, BranchSCMHead target, jenkins.scm.api.SCMHeadOrigin origin, jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy strategy)
  • Method Details

    • getPronoun

      public String getPronoun()
      Overrides:
      getPronoun in class jenkins.scm.api.SCMHead
    • getNumber

      public int getNumber()
    • isMerge

      public boolean isMerge()
      Whether we intend to build the merge of the PR head with the base branch.
      Returns:
      true if this is a merge PR head.
    • getCheckoutStrategy

      @NonNull public jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy getCheckoutStrategy()
      Specified by:
      getCheckoutStrategy in interface jenkins.scm.api.mixin.ChangeRequestSCMHead2
    • getId

      @NonNull public String getId()
      Specified by:
      getId in interface jenkins.scm.api.mixin.ChangeRequestSCMHead
    • getTarget

      @NonNull public BranchSCMHead getTarget()
      Specified by:
      getTarget in interface jenkins.scm.api.mixin.ChangeRequestSCMHead
    • getOriginName

      @NonNull public String getOriginName()
      Specified by:
      getOriginName in interface jenkins.scm.api.mixin.ChangeRequestSCMHead2
    • getSourceOwner

      public String getSourceOwner()
    • getSourceBranch

      public String getSourceBranch()
    • getSourceRepo

      public String getSourceRepo()
    • getOrigin

      @NonNull public jenkins.scm.api.SCMHeadOrigin getOrigin()
      Specified by:
      getOrigin in interface jenkins.scm.api.mixin.SCMHeadMixin
      Overrides:
      getOrigin in class jenkins.scm.api.SCMHead