mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +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);
|
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 () => {
|
it('creates PR with labels', async () => {
|
||||||
await ensureOnboardingPr(
|
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');
|
logger.info('DRY-RUN: Would create onboarding PR');
|
||||||
} else {
|
} else {
|
||||||
// TODO #22198
|
// TODO #22198
|
||||||
|
const prTitle =
|
||||||
|
config.semanticCommits === 'enabled'
|
||||||
|
? `${config.semanticCommitType ?? 'chore'}: ${
|
||||||
|
config.onboardingPrTitle
|
||||||
|
}`
|
||||||
|
: config.onboardingPrTitle!;
|
||||||
const pr = await platform.createPr({
|
const pr = await platform.createPr({
|
||||||
sourceBranch: config.onboardingBranch!,
|
sourceBranch: config.onboardingBranch!,
|
||||||
targetBranch: config.defaultBranch!,
|
targetBranch: config.defaultBranch!,
|
||||||
prTitle: config.onboardingPrTitle!,
|
prTitle,
|
||||||
prBody,
|
prBody,
|
||||||
labels,
|
labels,
|
||||||
platformOptions: getPlatformPrOptions({
|
platformOptions: getPlatformPrOptions({
|
||||||
|
|
Loading…
Reference in a new issue