import type { GitLocalState, GitProvider, GitPullRequestRef, GitRepositoryRef } from "@allurereport/core-api"; export type LaunchGitContextType = "branch" | "standalone" | "pull_request"; export type GitProviderType = "github" | "gitlab" | "bitbucket"; export type ResolvedGitFlowOptions = { gitFlow: boolean; ancestorLimit: number; }; export interface LaunchGitRepositoryDto { providerType: GitProviderType; name: string; url?: string; } export interface LaunchGitCommitDto { hash: string; url?: string; lineage?: string[]; } export interface LaunchGitBranchDto { name: string; url?: string; } export interface LaunchGitPullRequestDto { externalId: string; title?: string; url?: string; sourceBranch: LaunchGitBranchDto; targetBranch: LaunchGitBranchDto; } export interface LaunchStandaloneGitflowMetadata { hasUncommittedChanges?: boolean; isUnpublishedCommit?: boolean; isUnpublishedBranch?: boolean; } export interface LaunchPullRequestGitflowMetadata { workflowRunId?: string; workflowRunName?: string; } export interface LaunchGitContextDto { contextType: LaunchGitContextType; repository: LaunchGitRepositoryDto; commit: LaunchGitCommitDto; branch?: LaunchGitBranchDto; pullRequest?: LaunchGitPullRequestDto; metadata?: LaunchStandaloneGitflowMetadata | LaunchPullRequestGitflowMetadata; } export interface GitFlowContext { provider: GitProvider; repository: GitRepositoryRef; commit: string; branch?: string; targetBranch?: string; pullRequest?: GitPullRequestRef; firstParentAncestors: string[]; ancestorLimit: number; localState?: GitLocalState; }