jenkins-infra / repository-permissions-updater

Artifactory permissions synchronization tool and data set
79 stars 1.05k forks source link

If source repo ends with `/` hosting fails #2586

Open timja opened 2 years ago

timja commented 2 years ago

Reproduction steps

Repository URL

https://github.com/vzamoragbmc/compuware-topaz-for-enterprise-data-plugin/ <- removing trailing / fixed it

https://github.com/jenkins-infra/repository-permissions-updater/issues/2558#issuecomment-1151185093

Expected Results

Hosting worked

Actual Results

14:23:51.430 [main] INFO  i.j.i.r.hosting.Hoster - Approving hosting request 2558
14:23:54.056 [main] INFO  i.j.i.r.hosting.Hoster - Forking compuware-topaz-for-enterprise-data-plugin/
14:23:54.322 [main] WARN  i.j.i.r.hosting.Hoster - No such repository: compuware-topaz-for-enterprise-data-plugin/

Anything else?

No response

ADITYADAS1999 commented 1 year ago

hey timja , I check the url, the source repo is not present in particular location, in this issue?

timja commented 1 year ago

This field here: https://github.com/jenkins-infra/repository-permissions-updater/blob/0a6d1db4708f32ae0a48ee7edea2e5cc25b29594/src/main/java/io/jenkins/infra/repository_permissions_updater/hosting/HostingRequest.java#L12

should have trailing slashes stripped.

GitHub displays it in the UI without a trailing / which also didn't help with this issue

ADITYADAS1999 commented 1 year ago

This field here:

https://github.com/jenkins-infra/repository-permissions-updater/blob/0a6d1db4708f32ae0a48ee7edea2e5cc25b29594/src/main/java/io/jenkins/infra/repository_permissions_updater/hosting/HostingRequest.java#L12

should have trailing slashes stripped.

GitHub displays it in the UI without a trailing / which also didn't help with this issue

So all the changes are done at this file right ? Or we should raise a another issue for this?