Skip to content
Snippets Groups Projects
Unverified Commit da8f9cc3 authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix(manager/pre-commit): remove wrong gitea support (#19936)

parent 5047e066
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,12 @@ describe('modules/manager/pre-commit/extract', () => { ...@@ -95,7 +95,12 @@ describe('modules/manager/pre-commit/extract', () => {
}); });
it('can handle private git repos', () => { it('can handle private git repos', () => {
hostRules.find.mockReturnValue({ token: 'value' }); // url only
hostRules.find.mockReturnValueOnce({ token: 'value1' });
// hostType=github
hostRules.find.mockReturnValueOnce({});
// hostType=gitlab
hostRules.find.mockReturnValueOnce({ token: 'value' });
const result = extractPackageFile(enterpriseGitPrecommitConfig, filename); const result = extractPackageFile(enterpriseGitPrecommitConfig, filename);
expect(result).toEqual({ expect(result).toEqual({
deps: [ deps: [
......
...@@ -50,7 +50,6 @@ function determineDatasource( ...@@ -50,7 +50,6 @@ function determineDatasource(
return { skipReason: 'unknown-registry', registryUrls: [hostname] }; return { skipReason: 'unknown-registry', registryUrls: [hostname] };
} }
for (const [hostType, sourceId] of [ for (const [hostType, sourceId] of [
['gitea', GitlabTagsDatasource.id],
['github', GithubTagsDatasource.id], ['github', GithubTagsDatasource.id],
['gitlab', GitlabTagsDatasource.id], ['gitlab', GitlabTagsDatasource.id],
]) { ]) {
...@@ -64,7 +63,7 @@ function determineDatasource( ...@@ -64,7 +63,7 @@ function determineDatasource(
} }
logger.debug( logger.debug(
{ repository, registry: hostUrl }, { repository, registry: hostUrl },
'Provided hostname did not match any of the hostRules of hostType gitea,github nor gitlab' 'Provided hostname did not match any of the hostRules of hostType github nor gitlab'
); );
return { skipReason: 'unknown-registry', registryUrls: [hostname] }; return { skipReason: 'unknown-registry', registryUrls: [hostname] };
} }
......
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