From 874cfe80e207b3e28edf617c0605b89eb454fe3e Mon Sep 17 00:00:00 2001 From: RahulGautamSingh <rahultesnik@gmail.com> Date: Tue, 28 Mar 2023 21:34:08 +0530 Subject: [PATCH] fix(onboarding): force branch creation to prevent diff-check (#21200) --- .../repository/onboarding/branch/create.spec.ts | 10 ++++++++++ lib/workers/repository/onboarding/branch/create.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/workers/repository/onboarding/branch/create.spec.ts b/lib/workers/repository/onboarding/branch/create.spec.ts index 0644f77360..ccd2b2dae7 100644 --- a/lib/workers/repository/onboarding/branch/create.spec.ts +++ b/lib/workers/repository/onboarding/branch/create.spec.ts @@ -27,6 +27,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message: 'Add renovate.json', platformCommit: false, }); @@ -49,6 +50,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -72,6 +74,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -99,6 +102,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -123,6 +127,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -150,6 +155,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -175,6 +181,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -198,6 +205,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -222,6 +230,7 @@ describe('workers/repository/onboarding/branch/create', () => { contents: '{"foo":"bar"}', }, ], + force: true, message, platformCommit: false, }); @@ -241,6 +250,7 @@ describe('workers/repository/onboarding/branch/create', () => { branchName: 'renovate/configure', files: [{ type: 'addition', path, contents: '{"foo":"bar"}' }], message, + force: true, platformCommit: false, }); }); diff --git a/lib/workers/repository/onboarding/branch/create.ts b/lib/workers/repository/onboarding/branch/create.ts index d198ec1ced..ed32a67560 100644 --- a/lib/workers/repository/onboarding/branch/create.ts +++ b/lib/workers/repository/onboarding/branch/create.ts @@ -46,5 +46,6 @@ export async function createOnboardingBranch( ], message: commitMessage.toString(), platformCommit: !!config.platformCommit, + force: true, }); } -- GitLab