forked from renovatebot/renovate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(onboarding): add
commitBody
to commitMessage (renovatebot#26426)
- Loading branch information
1 parent
d736a14
commit 1ac7eae
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,54 @@ describe('workers/repository/onboarding/branch/create', () => { | |
}); | ||
}); | ||
|
||
describe('applies the commitBody value', () => { | ||
it('to the default commit message', async () => { | ||
await createOnboardingBranch({ | ||
...config, | ||
commitBody: 'some commit body', | ||
}); | ||
expect(scm.commitAndPush).toHaveBeenCalledWith({ | ||
branchName: 'renovate/configure', | ||
files: [ | ||
{ | ||
type: 'addition', | ||
path: 'renovate.json', | ||
contents: '{"foo":"bar"}', | ||
}, | ||
], | ||
force: true, | ||
message: `Add renovate.json\n\nsome commit body`, | ||
platformCommit: false, | ||
}); | ||
}); | ||
|
||
it('to the supplied commit message', async () => { | ||
const message = | ||
'We can Renovate if we want to, we can leave PRs in decline'; | ||
|
||
config.onboardingCommitMessage = message; | ||
|
||
await createOnboardingBranch({ | ||
...config, | ||
commitBody: 'Signed Off: {{{gitAuthor}}}', | ||
gitAuthor: '<Bot [email protected]>', | ||
}); | ||
expect(scm.commitAndPush).toHaveBeenCalledWith({ | ||
branchName: 'renovate/configure', | ||
files: [ | ||
{ | ||
type: 'addition', | ||
path: 'renovate.json', | ||
contents: '{"foo":"bar"}', | ||
}, | ||
], | ||
force: true, | ||
message: `We can Renovate if we want to, we can leave PRs in decline\n\nSigned Off: <Bot [email protected]>`, | ||
platformCommit: false, | ||
}); | ||
}); | ||
}); | ||
|
||
describe('applies the commitMessagePrefix value', () => { | ||
it('to the default commit message', async () => { | ||
const prefix = 'RENOV-123'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters