Skip to content
Snippets Groups Projects
Unverified Commit 56e6bd32 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

refactor: log if repository is a configured fork (#1071)

parent 7b16802e
No related branches found
No related tags found
No related merge requests found
......@@ -47,10 +47,14 @@ async function renovateRepository(repoConfig, token) {
await cleanup.pruneStaleBranches(config, []);
return null;
}
if (config.isFork && !config.renovateJsonPresent) {
logger.debug('repository is a fork and not manually configured');
await cleanup.pruneStaleBranches(config, []);
return null;
if (config.isFork) {
if (config.renovateJsonPresent) {
logger.info('Processing forked repository');
} else {
logger.debug('repository is a fork and not manually configured');
await cleanup.pruneStaleBranches(config, []);
return null;
}
}
if (config.baseBranch) {
// Renovate should read content and target PRs here
......
......@@ -76,6 +76,15 @@ describe('workers/repository', () => {
await repositoryWorker.renovateRepository(config);
expect(manager.detectPackageFiles.mock.calls.length).toBe(0);
});
it('does not skip repository if its a configured fork', async () => {
config.isFork = true;
config.renovateJsonPresent = true;
manager.detectPackageFiles.mockImplementationOnce(input => ({
...input,
...{ packageFiles: [] },
}));
await repositoryWorker.renovateRepository(config);
});
it('sets custom base branch', async () => {
config.baseBranch = 'some-branch';
config.api.branchExists.mockReturnValueOnce(true);
......
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