renovate icon indicating copy to clipboard operation
renovate copied to clipboard

fix(gitea): Use correct URL in PR Pagination

Open ASDFGamer opened this issue 2 years ago • 6 comments

Changes

This PR fixes a Bug that occures on the gitea plattform.

Previously it would use the url that was returned by gitea for the second page without checking if the url should be changed according to the gitUrl option.

This change removes the host part of the Url, like it is done for the first page of PRs and lets renovate choose the appropiate host and scheme.

Context

The bug occures only if the gitea api returns more than one page of PRs and the gitUrl option is set to endpoint or ssh. I have no minimal reproduction of this bug becuse it needs a gitea instance and i don't have a public instance.

Documentation (please check one with an [x])

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

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

I have verified these changes via:

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

ASDFGamer avatar Jan 26 '24 20:01 ASDFGamer

I thougth that the gitUrl endpoint setting can be used to override the url that is used (docs). I run renovate and gitea inside of docker und use the ROOT_URL setting already to use a different external URL for gitea. This url is not accessible by renovate because it is routed through a reverse proxy. And i can't add a dns entry with the same url to the gitea container because the reverse proxy also adds HTTPS which means that the ROOT_URL in gitea uses HTTPS.

ASDFGamer avatar Jan 26 '24 22:01 ASDFGamer

ok, then this should be hidden behind the feature flag RENOVATE_X_REBASE_PAGINATION_LINKS. it should work as is and can use your suggestion when flag is enabled.

https://docs.renovatebot.com/self-hosted-experimental/#renovate_x_rebase_pagination_links

viceice avatar Jan 27 '24 12:01 viceice

Sounds good, I'm gonna change it to work that way,but it could take some time

ASDFGamer avatar Jan 29 '24 21:01 ASDFGamer

@ASDFGamer do you have time to continue this?

rarkins avatar Mar 18 '24 21:03 rarkins

Thanks for the reminder, I think that i should be able to do it in the next week

ASDFGamer avatar Mar 20 '24 20:03 ASDFGamer

I'm not familiar with your process for PRs. Ist there still something that I have to do or are you just busy with other things?

ASDFGamer avatar Apr 14 '24 16:04 ASDFGamer

Ok, I will try to implement it like that.

ASDFGamer avatar May 17 '24 21:05 ASDFGamer