Class OriginPullRequestDiscoveryTrait

java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.scm.api.trait.SCMSourceTrait>

public class OriginPullRequestDiscoveryTrait extends jenkins.scm.api.trait.SCMSourceTrait
A Discovery trait for GitHub that will discover pull requests originating from a branch in the repository itself.
Since:
2.2.0
  • Field Details

    • NONE

      public static final int NONE
      None strategy.
      See Also:
    • MERGE

      public static final int MERGE
      Merging the pull request with the current target branch revision.
      See Also:
    • HEAD_AND_MERGE

      public static final int HEAD_AND_MERGE
      Both the current pull request revision and the pull request merged with the current target branch revision.
      See Also:
  • Constructor Details

    • OriginPullRequestDiscoveryTrait

      @DataBoundConstructor public OriginPullRequestDiscoveryTrait(int strategyId)
      Constructor for stapler.
      Parameters:
      strategyId - the strategy id.
    • OriginPullRequestDiscoveryTrait

      public OriginPullRequestDiscoveryTrait(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
      Constructor for programmatic instantiation.
      Parameters:
      strategies - the ChangeRequestCheckoutStrategy instances.
  • Method Details

    • getStrategyId

      public int getStrategyId()
      Gets the strategy id.
      Returns:
      the strategy id.
    • getStrategies

      @NonNull public Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getStrategies()
      Returns the strategies.
      Returns:
      the strategies.
    • decorateContext

      protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
      Overrides:
      decorateContext in class jenkins.scm.api.trait.SCMSourceTrait
    • includeCategory

      public boolean includeCategory(@NonNull jenkins.scm.api.SCMHeadCategory category)
      Overrides:
      includeCategory in class jenkins.scm.api.trait.SCMSourceTrait