Skip to content
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

REST api "repos/{owner}/{repo}/compare/{basehead}" cannot compare between commits #31838

Closed
Zarklord opened this issue Aug 15, 2024 · 1 comment
Labels
topic/api Concerns mainly the API type/bug

Comments

@Zarklord
Copy link

Zarklord commented Aug 15, 2024

Description

The documentation for that specific rest API describes the {basehead} as the following:

compare two branches or commits

but, in reality, it's only capable of comparing between two branches/tags, because the source code explicitly checks if the base is a branch or a tag and if the head is a branch of a tag which prevents you from comparing commits like the api's description implies you can, and that you can compare between commits on the web interface

(also as an aside, but the expected format of {basehead} isn't stated anywhere, nor is there an example for you to infer it)

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

N/A

Screenshots

image

Git Version

N/A

Operating System

ubuntu 22.04

How are you running Gitea?

docker gitea/gitea:1.22.1@sha256:1b9dcae47e821b8dd75c1e48d13677c428624d02e683badb461e4947300e7d19

Database

PostgreSQL

@Zarklord Zarklord changed the title web api repos/{owner}/{repo}/compare/{basehead} cannot compare between commits REST api "repos/{owner}/{repo}/compare/{basehead}" cannot compare between commits Aug 15, 2024
@kemzeb kemzeb added the topic/api Concerns mainly the API label Sep 24, 2024
@wxiaoguang
Copy link
Contributor

-> Make API "compare" accept commit IDs #32801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/api Concerns mainly the API type/bug
Projects
None yet
Development

No branches or pull requests

3 participants