public class GitHubSCMSourceContext extends jenkins.scm.api.trait.SCMSourceContext<GitHubSCMSourceContext,GitHubSCMSourceRequest>
SCMSourceContext
for GitHub.Constructor and Description |
---|
GitHubSCMSourceContext(jenkins.scm.api.SCMSourceCriteria criteria,
jenkins.scm.api.SCMHeadObserver observer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> |
forkPRStrategies()
Returns the set of
ChangeRequestCheckoutStrategy to create for each fork pull request. |
GitHubSCMSourceRequest |
newRequest(jenkins.scm.api.SCMSource source,
TaskListener listener) |
boolean |
notificationsDisabled()
Returns
true if notifications should be disabled. |
List<AbstractGitHubNotificationStrategy> |
notificationStrategies()
Returns the strategies used to notify Github of build status.
|
Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> |
originPRStrategies()
Returns the set of
ChangeRequestCheckoutStrategy to create for each origin pull request. |
boolean |
wantBranches()
Returns
true if the GitHubSCMSourceRequest will need information about branches. |
GitHubSCMSourceContext |
wantBranches(boolean include)
Adds a requirement for branch details to any
GitHubSCMSourceRequest for this context. |
boolean |
wantForkPRs()
Returns
true if the GitHubSCMSourceRequest will need information about fork pull requests. |
GitHubSCMSourceContext |
wantForkPRs(boolean include)
Adds a requirement for fork pull request details to any
GitHubSCMSourceRequest for this context. |
boolean |
wantOriginPRs()
Returns
true if the GitHubSCMSourceRequest will need information about origin pull requests. |
GitHubSCMSourceContext |
wantOriginPRs(boolean include)
Adds a requirement for origin pull request details to any
GitHubSCMSourceRequest for this context. |
boolean |
wantPRs()
Returns
true if the GitHubSCMSourceRequest will need information about pull requests. |
boolean |
wantTags()
Returns
true if the GitHubSCMSourceRequest will need information about tags. |
GitHubSCMSourceContext |
wantTags(boolean include)
Adds a requirement for tag details to any
GitHubSCMSourceRequest for this context. |
GitHubSCMSourceContext |
withForkPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
Defines the
ChangeRequestCheckoutStrategy instances to create for each fork pull request. |
GitHubSCMSourceContext |
withNotificationsDisabled(boolean disabled)
Defines the notification mode to use in this context.
|
GitHubSCMSourceContext |
withNotificationStrategies(List<AbstractGitHubNotificationStrategy> strategies)
Replaces the list of strategies used to notify Github of build status.
|
GitHubSCMSourceContext |
withNotificationStrategy(AbstractGitHubNotificationStrategy strategy)
Add a strategy used to notify Github of build status.
|
GitHubSCMSourceContext |
withOriginPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
Defines the
ChangeRequestCheckoutStrategy instances to create for each origin pull request. |
authorities, criteria, filters, observer, prefilters, withAuthority, withCriteria, withFilter, withPrefilter, withTrait, withTraits, withTraits
public GitHubSCMSourceContext(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer)
criteria
- (optional) criteria.observer
- the SCMHeadObserver
.public final boolean wantBranches()
true
if the GitHubSCMSourceRequest
will need information about branches.true
if the GitHubSCMSourceRequest
will need information about branches.public final boolean wantTags()
true
if the GitHubSCMSourceRequest
will need information about tags.true
if the GitHubSCMSourceRequest
will need information about tags.public final boolean wantPRs()
true
if the GitHubSCMSourceRequest
will need information about pull requests.true
if the GitHubSCMSourceRequest
will need information about pull requests.public final boolean wantOriginPRs()
true
if the GitHubSCMSourceRequest
will need information about origin pull requests.true
if the GitHubSCMSourceRequest
will need information about origin pull requests.public final boolean wantForkPRs()
true
if the GitHubSCMSourceRequest
will need information about fork pull requests.true
if the GitHubSCMSourceRequest
will need information about fork pull requests.@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> originPRStrategies()
ChangeRequestCheckoutStrategy
to create for each origin pull request.ChangeRequestCheckoutStrategy
to create for each origin pull request.@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> forkPRStrategies()
ChangeRequestCheckoutStrategy
to create for each fork pull request.ChangeRequestCheckoutStrategy
to create for each fork pull request.public final List<AbstractGitHubNotificationStrategy> notificationStrategies()
public final boolean notificationsDisabled()
true
if notifications should be disabled.true
if notifications should be disabled.@NonNull public GitHubSCMSourceContext wantBranches(boolean include)
GitHubSCMSourceRequest
for this context.include
- true
to add the requirement or false
to leave the requirement as is (makes
simpler with method chaining)this
for method chaining.@NonNull public GitHubSCMSourceContext wantTags(boolean include)
GitHubSCMSourceRequest
for this context.include
- true
to add the requirement or false
to leave the requirement as is (makes
simpler with method chaining)this
for method chaining.@NonNull public GitHubSCMSourceContext wantOriginPRs(boolean include)
GitHubSCMSourceRequest
for this context.include
- true
to add the requirement or false
to leave the requirement as is (makes
simpler with method chaining)this
for method chaining.@NonNull public GitHubSCMSourceContext wantForkPRs(boolean include)
GitHubSCMSourceRequest
for this context.include
- true
to add the requirement or false
to leave the requirement as is (makes
simpler with method chaining)this
for method chaining.@NonNull public GitHubSCMSourceContext withOriginPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
ChangeRequestCheckoutStrategy
instances to create for each origin pull request.strategies
- the strategies.this
for method chaining.@NonNull public GitHubSCMSourceContext withForkPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
ChangeRequestCheckoutStrategy
instances to create for each fork pull request.strategies
- the strategies.this
for method chaining.@NonNull public final GitHubSCMSourceContext withNotificationStrategies(List<AbstractGitHubNotificationStrategy> strategies)
strategies
- the strategies used to notify Github of build status.this
for method chaining.@NonNull public final GitHubSCMSourceContext withNotificationStrategy(AbstractGitHubNotificationStrategy strategy)
strategy
- a strategy used to notify Github of build status.this
for method chaining.@NonNull public final GitHubSCMSourceContext withNotificationsDisabled(boolean disabled)
disabled
- true
to disable automatic notifications.this
for method chaining.@NonNull public GitHubSCMSourceRequest newRequest(@NonNull jenkins.scm.api.SCMSource source, @CheckForNull TaskListener listener)
newRequest
in class jenkins.scm.api.trait.SCMSourceContext<GitHubSCMSourceContext,GitHubSCMSourceRequest>
Copyright © 2016–2020. All rights reserved.