mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
feat(onboarding): Semantic onboarding PR (#25666)
This commit is contained in:
parent
e9a2da0dfa
commit
9a55d753f9
2 changed files with 24 additions and 1 deletions
|
@ -77,6 +77,23 @@ describe('workers/repository/onboarding/pr/index', () => {
|
|||
expect(platform.createPr).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('creates semantic PR', async () => {
|
||||
await ensureOnboardingPr(
|
||||
{
|
||||
...config,
|
||||
semanticCommitType: undefined, // should default to "chore"
|
||||
semanticCommits: 'enabled',
|
||||
},
|
||||
packageFiles,
|
||||
branches,
|
||||
);
|
||||
expect(platform.createPr).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
prTitle: 'chore: Configure Renovate',
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('creates PR with labels', async () => {
|
||||
await ensureOnboardingPr(
|
||||
{
|
||||
|
|
|
@ -173,10 +173,16 @@ If you need any further assistance then you can also [request help here](${
|
|||
logger.info('DRY-RUN: Would create onboarding PR');
|
||||
} else {
|
||||
// TODO #22198
|
||||
const prTitle =
|
||||
config.semanticCommits === 'enabled'
|
||||
? `${config.semanticCommitType ?? 'chore'}: ${
|
||||
config.onboardingPrTitle
|
||||
}`
|
||||
: config.onboardingPrTitle!;
|
||||
const pr = await platform.createPr({
|
||||
sourceBranch: config.onboardingBranch!,
|
||||
targetBranch: config.defaultBranch!,
|
||||
prTitle: config.onboardingPrTitle!,
|
||||
prTitle,
|
||||
prBody,
|
||||
labels,
|
||||
platformOptions: getPlatformPrOptions({
|
||||
|
|
Loading…
Reference in a new issue