Class AccessSpecifiedRepositories

All Implemented Interfaces:
Describable<RepositoryAccessStrategy>, Serializable

public class AccessSpecifiedRepositories extends RepositoryAccessStrategy
This mode only allows the GitHubAppCredentials to generate an installation token for the specified owner and list of repositories.

The context of where the credentials are used in Jenkins is irrelevant.

Specifying an empty list of repositories allows the credential to generate an installation token that can access any repository available to the owner.

See Also:
  • Constructor Details

    • AccessSpecifiedRepositories

      @DataBoundConstructor public AccessSpecifiedRepositories(@CheckForNull String owner, @NonNull List<String> repositories)
  • Method Details

    • getOwner

      public String getOwner()
    • getRepositories

      public List<String> getRepositories()
    • getRepositoriesForJelly

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getRepositoriesForJelly()
    • forContext

      public AccessibleRepositories forContext(GitHubAppUsageContext context)
      Description copied from class: RepositoryAccessStrategy
      Get the AccessibleRepositories to use when generating installation access tokens for the inferred contextual owner and repository.

      Called when the credential is used in a context where an owner and repository can be inferred.

      Specified by:
      forContext in class RepositoryAccessStrategy
      Returns:
      null if the accessible repositories are unknown, or if no repositories are accessible in the specified context