UNPKG

@vizzly-testing/cli

Version:

Visual review platform for UI developers and designers

56 lines (55 loc) 1.85 kB
/** * CI Environment Detection * * Generic functions to extract git and PR information from any CI provider */ /** * Get the branch name from CI environment variables * @returns {string|null} Branch name or null if not available */ export function getBranch(): string | null; /** * Get the commit SHA from CI environment variables * @returns {string|null} Commit SHA or null if not available */ export function getCommit(): string | null; /** * Get the commit message from CI environment variables * @returns {string|null} Commit message or null if not available */ export function getCommitMessage(): string | null; /** * Get the pull request number from CI environment variables * @returns {number|null} PR number or null if not available/not a PR */ export function getPullRequestNumber(): number | null; /** * Get the PR head SHA from CI environment variables * @returns {string|null} PR head SHA or null if not available */ export function getPullRequestHeadSha(): string | null; /** * Get the PR base SHA from CI environment variables * @returns {string|null} PR base SHA or null if not available */ export function getPullRequestBaseSha(): string | null; /** * Get the PR head ref (branch) from CI environment variables * @returns {string|null} PR head ref or null if not available */ export function getPullRequestHeadRef(): string | null; /** * Get the PR base ref (target branch) from CI environment variables * @returns {string|null} PR base ref or null if not available */ export function getPullRequestBaseRef(): string | null; /** * Check if we're currently in a pull request context * @returns {boolean} True if in a PR context */ export function isPullRequest(): boolean; /** * Get the CI provider name * @returns {string} CI provider name or 'unknown' */ export function getCIProvider(): string;