renovate icon indicating copy to clipboard operation
renovate copied to clipboard

fix(gitlab): Fixes splitting of go package name

Open ManuelB opened this issue 1 year ago • 2 comments

Here is the corresponding discussion: https://github.com/renovatebot/renovate/discussions/26408

Changes

This will correctly split the registryUrl and the packageName of a go package.

Context

It is necessary to split a typical go modul into an url and a package name for gitlab.

e.g. example.com/gitlab/my-repo.git

registryUrl: example.com/gitlab/ packageName: my-repo

Documentation (please check one with an [x])

  • [ ] I have updated the documentation, or
  • [x] No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • [ ] Code inspection only, or
  • [x] Newly added/modified unit tests, or
  • [ ] No unit tests but ran on a real repository, or
  • [ ] Both unit tests + ran on a real repository

ManuelB avatar Jan 02 '24 14:01 ManuelB

@rarkins I now implemented this in the way that you requested in: https://github.com/renovatebot/renovate/discussions/26408

ManuelB avatar Jan 05 '24 09:01 ManuelB

@rarkins I fixed the prettier error:

vscode@6d06bfe1cec1:/workspaces/renovate$ git diff
diff --git a/lib/modules/datasource/go/base.spec.ts b/lib/modules/datasource/go/base.spec.ts
index b191d9d4c..e306ad6d1 100644
--- a/lib/modules/datasource/go/base.spec.ts
+++ b/lib/modules/datasource/go/base.spec.ts
@@ -412,7 +412,6 @@ describe('modules/datasource/go/base', () => {
           'example.com/gitlab/my-project/my-repo.git',
         );
 
-
         expect(res).toEqual({
           datasource: GitlabTagsDatasource.id,
           packageName: 'my-project/my-repo',
vscode@6d06bfe1cec1:/workspaces/renovate$ npx prettier --cache --check '**/*.{ts,js,mjs,json,md,yml}' "--cache-location" ".cache/prettier"
Checking formatting...
All matched files use Prettier code style!

ManuelB avatar Jan 05 '24 13:01 ManuelB

@rarkins I fixed the es-lint issue here: https://github.com/renovatebot/renovate/pull/26477/commits/0d11a38a32b2f223a4f47c9e7f3da3749230a5cb can you rerun the build?

Do I have a possibility to check this locally?

ManuelB avatar Jan 10 '24 08:01 ManuelB

Yes, you can run pnpm run lint-fix locally to run all linting

rarkins avatar Jan 10 '24 09:01 rarkins

$ pnpm run lint-fix
...
Linting: 239 file(s)
Summary: 0 error(s)

ManuelB avatar Jan 10 '24 09:01 ManuelB

:tada: This PR is included in version 37.128.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

renovate-release avatar Jan 10 '24 16:01 renovate-release

@viceice & @rarkins thank you guys. You rock! 🎉

ManuelB avatar Jan 10 '24 19:01 ManuelB