mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-03 10:49:20 +00:00
19 lines
626 B
TypeScript
19 lines
626 B
TypeScript
import * as git from '../../../util/git';
|
|
import type { CommitFilesConfig, LongCommitSha } from '../../../util/git/types';
|
|
import { DefaultGitScm } from '../default-scm';
|
|
import { commitFiles, isGHApp } from './';
|
|
|
|
export class GithubScm extends DefaultGitScm {
|
|
override commitAndPush(
|
|
commitConfig: CommitFilesConfig,
|
|
): Promise<LongCommitSha | null> {
|
|
let platformCommit = commitConfig.platformCommit;
|
|
if (platformCommit === 'auto' && isGHApp()) {
|
|
platformCommit = 'enabled';
|
|
}
|
|
|
|
return platformCommit === 'enabled'
|
|
? commitFiles(commitConfig)
|
|
: git.commitFiles(commitConfig);
|
|
}
|
|
}
|