1 | import { Env } from "./ci_source";
|
2 | import { RepoMetaData } from "../dsl/BitBucketServerDSL";
|
3 | /**
|
4 | * Validates that all ENV keys exist and have a length
|
5 | * @param {Env} env The environment.
|
6 | * @param {[string]} keys Keys to ensure existence of
|
7 | * @returns {bool} true if they exist, false if not
|
8 | */
|
9 | export declare function ensureEnvKeysExist(env: Env, keys: string[]): boolean;
|
10 | /**
|
11 | * Validates that all ENV keys exist and can be turned into ints
|
12 | * @param {Env} env The environment.
|
13 | * @param {[string]} keys Keys to ensure existence and number-ness of
|
14 | * @returns {bool} true if they are all good, false if not
|
15 | */
|
16 | export declare function ensureEnvKeysAreInt(env: Env, keys: string[]): boolean;
|
17 | /**
|
18 | * Retrieves the current pull request open for this branch from an API
|
19 | * @param {Env} env The environment
|
20 | * @param {string} branch The branch to find pull requests for
|
21 | * @returns {number} The pull request ID, if any. Otherwise 0 (Github starts from #1).
|
22 | * If there are multiple pull requests open for a branch, returns the first.
|
23 | */
|
24 | export declare function getPullRequestIDForBranch(metadata: RepoMetaData, env: Env, branch: string): Promise<number>;
|