refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

refreshVersionsCleanup doesn't clear error comments

Open higoorc opened this issue 3 years ago • 1 comments

⚠️ Is your feature request related to a problem? Please describe

When using public repositories together with private repos, the refreshVersions will try to fetch all available versions in all repositories declared in my configuration. But, some public libraries, will receive 403 or 404 when trying to check these files in my private repo, as expected since they don't exist/don't have credentials to access them.

The refreshVersion will add a comment in the versions.properties declaring this error, but the refreshVersionsCleanup doesn't will clear it, which can be annoying if you have a lot of dependencies.

💡 Describe the solution you'd like

The refreshVersionCleanup need to delete all unnecessary comments added by refreshVersion. For example: ## failed to check repo https://xxx Cause: http status code 403 HTTP 403 Response.error()

🤚 Do you want to develop this feature yourself?

I actually can try to develop this feature if you guys agree and provide some guidance.

higoorc avatar Apr 19 '22 13:04 higoorc

@higoorc I'm sorry we were quite overwhelmed with the task of releasing Gradle Versions Catalog support.

You are completely right on all points.

I actually can try to develop this feature if you guys agree and provide some guidance.

I wrote a failing test for you :) Start here https://github.com/jmfayard/refreshVersions/commit/744691de3a1958b5cc086c54b10d810d627ac1fc

jmfayard avatar Sep 13 '22 21:09 jmfayard