-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gitea): Use correct URL in PR Pagination #26876
Conversation
This fixes a Bug that occures, when multiple pages of PRs are returned by gitea and the gitUrl option is set to endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't a renovate bug. you're not correctly configure gitea to return proper urls.
set ROOT_URL
to the public url and everything is fine.
https://docs.gitea.com/administration/config-cheat-sheet#server-server
I thougth that the gitUrl endpoint setting can be used to override the url that is used (docs). |
ok, then this should be hidden behind the feature flag https://docs.renovatebot.com/self-hosted-experimental/#renovate_x_rebase_pagination_links |
Sounds good, I'm gonna change it to work that way,but it could take some time |
@ASDFGamer do you have time to continue this? |
Thanks for the reminder, I think that i should be able to do it in the next week |
This is done as a preparation for the next changes to make the code cleaner
The RENOVATE_X_REBASE_PAGINATION_LINKS is now used to enable the rebasing of the pagination links
The docs for RENOVATE_X_REBASE_PAGINATION_LINKS contain now a mentioning of the gitea platform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs tests
This adds two tests for paginated PRs. The first test is for paginated PRs where gitlab returns the expected link and the second test is for paginated PRs where gitlab returns a different link. The first test could have been added bevore this PR and isn't changed by this PR.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need some time to investigate further. maybe we need a refactor first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be implemented like in #19888 instead
Ok, I will try to implement it like that. |
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])
How I've tested my work (please select one)
I have verified these changes via: