@atomist/automation-client
Version:
Atomist API for software low-level client
34 lines (26 loc) • 987 B
text/typescript
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 {
(MappedParameters.GitHubOwner, false)
public owner: string;
(MappedParameters.GitHubRepository, false)
public repo: string;
({ description: "Ref", ...GitShaRegExp, required: false })
public sha: string;
({ description: "Branch Defaults to 'master'", ...GitBranchRegExp, required: false })
public branch: string = "master";
({ description: "regex", required: false })
public repos: string = ".*";
}