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.
  • 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

      @CheckForNull public List<String> getAutoApprovalLabels()
      The labels that approve a pull request on sight, or null if none are set.
    • getAutoApprovalLabelsString

      @CheckForNull public String getAutoApprovalLabelsString()
      The same labels as one comma-separated string, which is how the config form wants them.
    • setAutoApprovalLabels

      @DataBoundSetter public void setAutoApprovalLabels(@CheckForNull String autoApprovalLabels)
      Reads the labels back from the config form, where they arrive comma-separated.
    • setAutoApprovalLabelsList

      public void setAutoApprovalLabelsList(@CheckForNull List<String> autoApprovalLabels)
      Sets the same labels from a list, for callers that already have one.
    • getAutoApprovalUsers

      @CheckForNull public List<String> getAutoApprovalUsers()
      The GitHub logins whose pull requests are approved on sight, or null if none are set.
    • getAutoApprovalUsersString

      @CheckForNull public String getAutoApprovalUsersString()
      The same logins as one comma-separated string, which is how the config form wants them.
    • setAutoApprovalUsers

      @DataBoundSetter public void setAutoApprovalUsers(@CheckForNull String autoApprovalUsers)
      Reads the logins back from the config form, where they arrive comma-separated.
    • setAutoApprovalUsersList

      public void setAutoApprovalUsersList(@CheckForNull List<String> autoApprovalUsers)
      Sets the same logins from a list, for callers that already have one.
    • 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:
      checkTrusted in class 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>
      Throws:
      IOException
      InterruptedException