Closed
Description
Description
After migrating to version 1.17.0, some newly created PRs as well as some PRs that were previously created in version 1.16.9 now won't open and always result in a 500 error.
The logs always show the same error when trying to open an affected PR:
2022/08/02 10:07:13 ...vices/pull/update.go:109:IsUserAllowedToUpdate() [E] [62e8db31] pr.BaseRepo.GetUnit(unit.TypePullRequests): Unit type does not exist: TypePullRequests
2022/08/02 10:07:13 ...ers/web/repo/pull.go:509:PrepareViewPullInfo() [E] [62e8db31] IsUserAllowedToUpdate: Unit type does not exist: TypePullRequests
2022/08/02 10:07:13 [62e8db31] router: completed GET /-redacted-/backoffice-api/pulls/2323 for -redacted-:50108, 500 Internal Server Error in 135.1ms @ repo/issue.go:1122(repo.ViewIssue)
This seems to be the case for all PRs that originate from the fork of a user where, at least after migrating to 1.17.0, 'Enable Repository Pull Requests' is no longer enabled in the fork's Repository settings.
After (re-)enabling this option, the 500 error no longer occurs for PRs originating from that specific fork.
Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Official Docker image on Ubuntu Server
Database
No response