Class TrustExternalApproval
java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.scm.api.trait.SCMHeadAuthority<?,?,?>>
jenkins.scm.api.trait.SCMHeadAuthority<org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead, org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision>
org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait.GitHubForkTrustPolicy
io.jenkins.plugins.github_pr_approval.TrustExternalApproval
- All Implemented Interfaces:
Describable<jenkins.scm.api.trait.SCMHeadAuthority<?,?, ?>>
public class TrustExternalApproval
extends org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait.GitHubForkTrustPolicy
An
SCMHeadAuthority that holds fork pull requests back until someone approves them.
The job starts out disabled and only builds once an administrator has approved it. Pull
requests from a trusted login, or carrying a trusted label, are approved for you.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOur descriptor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckTrusted(org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest request, org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead head) The labels that approve a pull request on sight, ornullif none are set.The same labels as one comma-separated string, which is how the config form wants them.The GitHub logins whose pull requests are approved on sight, ornullif none are set.The same logins as one comma-separated string, which is how the config form wants them.booleanWhether every new commit on the pull request has to be approved again.voidsetAutoApprovalLabels(String autoApprovalLabels) Reads the labels back from the config form, where they arrive comma-separated.voidsetAutoApprovalLabelsList(List<String> autoApprovalLabels) Sets the same labels from a list, for callers that already have one.voidsetAutoApprovalUsers(String autoApprovalUsers) Reads the logins back from the config form, where they arrive comma-separated.voidsetAutoApprovalUsersList(List<String> autoApprovalUsers) Sets the same logins from a list, for callers that already have one.voidsetRequireApprovalForNewCommits(boolean requireApprovalForNewCommits) Methods inherited from class jenkins.scm.api.trait.SCMHeadAuthority
_for, all, checkTrusted, getDescriptor, isApplicableTo, isApplicableTo, isApplicableTo, isTrusted, isTrusted
-
Constructor Details
-
TrustExternalApproval
@DataBoundConstructor public TrustExternalApproval()Constructor.
-
-
Method Details
-
isRequireApprovalForNewCommits
public boolean isRequireApprovalForNewCommits()Whether every new commit on the pull request has to be approved again. -
setRequireApprovalForNewCommits
@DataBoundSetter public void setRequireApprovalForNewCommits(boolean requireApprovalForNewCommits) -
getAutoApprovalLabels
-
getAutoApprovalLabelsString
The same labels as one comma-separated string, which is how the config form wants them. -
setAutoApprovalLabels
Reads the labels back from the config form, where they arrive comma-separated. -
setAutoApprovalLabelsList
-
getAutoApprovalUsers
-
getAutoApprovalUsersString
The same logins as one comma-separated string, which is how the config form wants them. -
setAutoApprovalUsers
Reads the logins back from the config form, where they arrive comma-separated. -
setAutoApprovalUsersList
-
checkTrusted
protected boolean checkTrusted(@NonNull org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest request, @NonNull org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead head) throws IOException, InterruptedException - Specified by:
checkTrustedin classjenkins.scm.api.trait.SCMHeadAuthority<org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead, org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision>- Throws:
IOExceptionInterruptedException
-