-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
Milestone
Description
Description
The API endpoint /repos/{owner}/{repo}/compare/{basehead} fails to return commit comparison data (in the same branch) when the "Pull Requests" feature is disabled for a repository. The request returns an error: {"errors":null,"message":"Can't read pulls or can't read UnitTypeCode","url":"https://xxx.com/api/swagger"}.
However, commit comparison through the web interface continues to work normally.
Test it with this command:
curl -X 'GET' 'https://demo.gitea.com/api/v1/repos/dangjinghao/test-diff/compare/5b20aef62d...main' -H 'accept: application/json'web: https://demo.gitea.com/dangjinghao/test-diff/compare/5b20aef62d...main
Gitea Version
v1.25.1 and 1c8c565(latest commit)
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker
Database
SQLite