Skip to content
Snippets Groups Projects
Commit 8c795361 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

feat(config): allow .github/renovate.json

parent 35172b5b
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@ async function mergeRenovateConfig(config) {
let configFile;
if (fileList.includes('renovate.json')) {
configFile = 'renovate.json';
} else if (fileList.includes('.github/renovate.json')) {
configFile = '.github/renovate.json';
} else if (fileList.includes('.renovaterc')) {
configFile = '.renovaterc';
} else if (fileList.includes('.renovaterc.json')) {
......
......@@ -6,6 +6,7 @@ const findFile = async fileName => {
const renovateJsonExists = async () =>
(await findFile('renovate.json')) ||
(await findFile('.github/renovate.json')) ||
(await findFile('.renovaterc')) ||
findFile('.renovaterc.json');
......
......@@ -66,6 +66,14 @@ describe('workers/repository/init/config', () => {
expect(e.validationError).toMatchSnapshot();
expect(e.validationMessage).toMatchSnapshot();
});
it('finds .github/renovate.json', async () => {
platform.getFileList.mockReturnValue([
'package.json',
'.github/renovate.json',
]);
platform.getFile.mockReturnValue('{}');
await mergeRenovateConfig(config);
});
it('finds .renovaterc.json', async () => {
platform.getFileList.mockReturnValue([
'package.json',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment