Skip to content

Commit e1fdb37

Browse files
committed
Add prTitle to all missing commitAndPush()
1 parent 8d3d5a7 commit e1fdb37

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

lib/workers/repository/onboarding/branch/create.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { RenovateConfig } from '../../../../config/types';
33
import { logger } from '../../../../logger';
44
import { scm } from '../../../../modules/platform/scm';
55
import { compile } from '../../../../util/template';
6-
import { getDefaultConfigFileName } from '../common';
6+
import { getDefaultConfigFileName, getSemanticCommitPrTitle } from '../common';
77
import { OnboardingCommitMessageFactory } from './commit-message';
88
import { getOnboardingConfigContents } from './config';
99

@@ -38,6 +38,11 @@ export async function createOnboardingBranch(
3838
return null;
3939
}
4040

41+
const prTitle =
42+
config.semanticCommits === 'enabled'
43+
? getSemanticCommitPrTitle(config)
44+
: config.onboardingPrTitle!;
45+
4146
return scm.commitAndPush({
4247
baseBranch: config.baseBranch,
4348
branchName: config.onboardingBranch!,
@@ -52,6 +57,7 @@ export async function createOnboardingBranch(
5257
message: commitMessage,
5358
platformCommit: config.platformCommit,
5459
force: true,
55-
// TODO: add prTitle for Gerrit
60+
// Only needed by Gerrit platform
61+
prTitle,
5662
});
5763
}

lib/workers/repository/onboarding/branch/rebase.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { RenovateConfig } from '../../../../config/types';
33
import { logger } from '../../../../logger';
44
import { scm } from '../../../../modules/platform/scm';
55
import { toSha256 } from '../../../../util/hash';
6-
import { getDefaultConfigFileName } from '../common';
6+
import { getDefaultConfigFileName, getSemanticCommitPrTitle } from '../common';
77
import { OnboardingCommitMessageFactory } from './commit-message';
88
import { getOnboardingConfigContents } from './config';
99

@@ -46,6 +46,11 @@ export async function rebaseOnboardingBranch(
4646
);
4747
const commitMessage = commitMessageFactory.create();
4848

49+
const prTitle =
50+
config.semanticCommits === 'enabled'
51+
? getSemanticCommitPrTitle(config)
52+
: config.onboardingPrTitle!;
53+
4954
// TODO #22198
5055
return scm.commitAndPush({
5156
baseBranch: config.baseBranch,
@@ -59,6 +64,7 @@ export async function rebaseOnboardingBranch(
5964
],
6065
message: commitMessage.toString(),
6166
platformCommit: config.platformCommit,
62-
// TODO: add prTitle for Gerrit
67+
// Only needed by Gerrit platform
68+
prTitle,
6369
});
6470
}

0 commit comments

Comments
 (0)