import type { DateTime } from 'luxon'; import * as git from '../../util/git/index.ts'; import type { CommitFilesConfig } from '../../util/git/types.ts'; import type { LongCommitSha } from '../../util/schema-utils/git.ts'; import type { PlatformScm } from './types.ts'; 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)); } getBranchUpdateDate(branchName: string): Promise { return git.getBranchUpdateDate(branchName); } getAllBranchUpdateDates(): Promise> { return git.getAllBranchUpdateDates(); } 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, baseBranch: string): Promise { return git.isBranchModified(branchName, baseBranch); } getFileList(): Promise { return git.getFileList(); } checkoutBranch(branchName: string): Promise { return git.checkoutBranch(branchName); } mergeAndPush(branchName: string): Promise { return git.mergeBranch(branchName); } mergeToLocal(branchName: string): Promise { return git.mergeToLocal(branchName); } syncForkWithUpstream(branchName: string): Promise { return git.syncForkWithUpstream(branchName); } }