UNPKG

cfn-forge

Version:

CloudFormation deployment automation tool with git-based workflows

92 lines (80 loc) 2.15 kB
/** * Git Manager Interface * Defines the contract for git operations to ensure portability */ class IGitManager { /** * Get the current commit hash (short version) * @returns {Promise<string>} Short commit hash (8 chars) */ async getCommitHash() { throw new Error('Not implemented'); } /** * Get the current branch name * @returns {Promise<string>} Current branch name */ async getCurrentBranch() { throw new Error('Not implemented'); } /** * Get the latest tag * @returns {Promise<string|null>} Latest tag or null if none */ async getLatestTag() { throw new Error('Not implemented'); } /** * Check if current commit is tagged * @returns {Promise<boolean>} True if on a tagged commit */ async isOnTaggedCommit() { throw new Error('Not implemented'); } /** * Check if there are uncommitted changes * @returns {Promise<boolean>} True if working directory has changes */ async hasUncommittedChanges() { throw new Error('Not implemented'); } /** * Get list of changed files * @returns {Promise<string[]>} Array of changed file paths */ async getChangedFiles() { throw new Error('Not implemented'); } /** * Get repository root directory * @returns {Promise<string>} Absolute path to repo root */ async getRepoRoot() { throw new Error('Not implemented'); } /** * Check if path is inside a git repository * @returns {Promise<boolean>} True if inside a git repo */ async isGitRepository() { throw new Error('Not implemented'); } /** * Get commit message for a specific commit * @param {string} commitHash - Commit hash * @returns {Promise<string>} Commit message */ async getCommitMessage(commitHash) { throw new Error('Not implemented'); } /** * Get list of commits between two refs * @param {string} fromRef - Starting reference * @param {string} toRef - Ending reference * @returns {Promise<Array>} Array of commit objects */ async getCommitsBetween(fromRef, toRef) { throw new Error('Not implemented'); } } module.exports = IGitManager;