mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 00:56:26 +00:00
dd6c8e5147
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
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<boolean> {
|
|
return Promise.resolve(git.branchExists(branchName));
|
|
}
|
|
|
|
commitAndPush(commitConfig: CommitFilesConfig): Promise<CommitSha | null> {
|
|
return git.commitFiles(commitConfig);
|
|
}
|
|
|
|
deleteBranch(branchName: string): Promise<void> {
|
|
return git.deleteBranch(branchName);
|
|
}
|
|
|
|
getBranchCommit(branchName: string): Promise<CommitSha | null> {
|
|
return Promise.resolve(git.getBranchCommit(branchName));
|
|
}
|
|
|
|
isBranchBehindBase(branchName: string, baseBranch: string): Promise<boolean> {
|
|
return git.isBranchBehindBase(branchName, baseBranch);
|
|
}
|
|
|
|
isBranchConflicted(baseBranch: string, branch: string): Promise<boolean> {
|
|
return git.isBranchConflicted(baseBranch, branch);
|
|
}
|
|
|
|
isBranchModified(branchName: string): Promise<boolean> {
|
|
return git.isBranchModified(branchName);
|
|
}
|
|
}
|