UNPKG

@atomist/automation-client

Version:

Atomist API for software low-level client

34 lines (26 loc) 987 B
import { MappedParameter, MappedParameters, Parameter, } from "../../../decorators"; import { FallbackParams } from "./FallbackParams"; import { GitHubTargetsParams } from "./GitHubTargetsParams"; import { GitBranchRegExp, GitShaRegExp, } from "./validationPatterns"; /** * Resolve from a Mapped parameter or from a supplied repos regex if no repo mapping */ export class GitHubFallbackReposParameters extends GitHubTargetsParams implements FallbackParams { @MappedParameter(MappedParameters.GitHubOwner, false) public owner: string; @MappedParameter(MappedParameters.GitHubRepository, false) public repo: string; @Parameter({ description: "Ref", ...GitShaRegExp, required: false }) public sha: string; @Parameter({ description: "Branch Defaults to 'master'", ...GitBranchRegExp, required: false }) public branch: string = "master"; @Parameter({ description: "regex", required: false }) public repos: string = ".*"; }