import * as git from '../../util/git'; import type { CommitFilesConfig, CommitSha } from '../../util/git/types'; import type { PlatformScm } from './types'; export class DefaultGitScm implements PlatformScm { branchExists(branchName: string): Promise { return Promise.resolve(git.branchExists(branchName)); } commitAndPush(commitConfig: CommitFilesConfig): Promise { return git.commitFiles(commitConfig); } deleteBranch(branchName: string): Promise { return git.deleteBranch(branchName); } getBranchCommit(branchName: string): Promise { return Promise.resolve(git.getBranchCommit(branchName)); } isBranchBehindBase(branchName: string, baseBranch: string): Promise { return git.isBranchBehindBase(branchName, baseBranch); } isBranchConflicted(baseBranch: string, branch: string): Promise { return git.isBranchConflicted(baseBranch, branch); } isBranchModified(branchName: string): Promise { return git.isBranchModified(branchName); } }