warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

Verified GitHub links should probably ignore case for orgs

Open edgarrmondragon opened this issue 1 year ago • 4 comments

Describe the bug

For project, meltanolabs-tap-postgres, the homepage link points to https://github.com/meltanolabs/tap-postgres (org in lower case), but the trusted publisher was created with MeltanoLabs/tap-postgres (org in upper case).

The result is that the links to the GitHub repo are not "verified".

Expected behavior

Links to the GitHub repo are verified when using trusted publishers even when the GitHub org doesn't match the case.

To Reproduce

NA, see description of the problem above.

My Platform

Additional context

The easy workaround on our end is simply to use consistent casing throughout, but I though I'd still log in case y'all think this is a bug.

edgarrmondragon avatar Sep 09 '24 19:09 edgarrmondragon

Thanks @edgarrmondragon! If I understand correctly, this is indeed a bug in the URL verification handling -- GitHub slugs are case insensitive, so we should always be similarly insensitive when verifying them. I'll look at a fix today.

woodruffw avatar Sep 11 '24 15:09 woodruffw

I looked into this a bit, and it's indeed a bug: GitHub and GitLab (at minimum) have case-insensitive owner/repo slugs, meaning we should compare them case insensitively.

Doing this with the current abstraction is a little painful, though (since we currently centralize URL verification across all publisher types, and not all publishers are necessarily insensitive).

woodruffw avatar Sep 11 '24 19:09 woodruffw

Gotcha, granted this is easy to fix on the user's end. Thanks for acknowledging it!

edgarrmondragon avatar Sep 11 '24 20:09 edgarrmondragon

No problem! It's also pretty easy to fix on the Warehouse side, but not "20 minutes between bigger tasks" easy 😅 -- I'll try and get to it this weekend.

woodruffw avatar Sep 11 '24 20:09 woodruffw