diff --git a/lib/modules/datasource/go/base.spec.ts b/lib/modules/datasource/go/base.spec.ts index 3f0209831718e9..bdc3036fbfd519 100644 --- a/lib/modules/datasource/go/base.spec.ts +++ b/lib/modules/datasource/go/base.spec.ts @@ -15,11 +15,12 @@ const hostRules = mocked(_hostRules); describe('modules/datasource/go/base', () => { describe('simple cases', () => { it.each` - module | datasource | packageName - ${'gopkg.in/foo'} | ${'github-tags'} | ${'go-foo/foo'} - ${'gopkg.in/foo/bar'} | ${'github-tags'} | ${'foo/bar'} - ${'github.com/foo/bar'} | ${'github-tags'} | ${'foo/bar'} - ${'bitbucket.org/foo/bar'} | ${'bitbucket-tags'} | ${'foo/bar'} + module | datasource | packageName + ${'gopkg.in/foo'} | ${'github-tags'} | ${'go-foo/foo'} + ${'gopkg.in/foo/bar'} | ${'github-tags'} | ${'foo/bar'} + ${'github.com/foo/bar'} | ${'github-tags'} | ${'foo/bar'} + ${'bitbucket.org/foo/bar'} | ${'bitbucket-tags'} | ${'foo/bar'} + ${'code.cloudfoundry.org/lager'} | ${'github-tags'} | ${'cloudfoundry/lager'} `( '$module -> $datasource: $packageName', async ({ module, datasource, packageName }) => { diff --git a/lib/modules/datasource/go/base.ts b/lib/modules/datasource/go/base.ts index 6f9fe99ee4e44e..967095b86b164f 100644 --- a/lib/modules/datasource/go/base.ts +++ b/lib/modules/datasource/go/base.ts @@ -58,6 +58,18 @@ export class BaseGoDatasource { }; } + if (goModule.startsWith('code.cloudfoundry.org/')) { + const packageName = goModule.replace( + 'code.cloudfoundry.org', + 'cloudfoundry' + ); + return { + datasource: GithubTagsDatasource.id, + packageName, + registryUrl: 'https://github.com', + }; + } + return await BaseGoDatasource.goGetDatasource(goModule); }