forgejo/routers/api/v1
Earl Warren 4c4fe595c2 chore(cleanup): fix and simplify API comparison helper (#7978)
headIsTag := headGitRepo.IsCommitExist(baseBranch)

is wrong on two counts:

- it must be assigned to commitIsTag
- it must check headBranch and not baseBranch

this is not a bug but it certainly is confusing.

Also, the logic below

 	headBranchRef := headBranch
	if headIsBranch {
		headBranchRef = headBranch
	} else if headIsTag {
		headBranchRef = headBranch
	}

can be simplified as:

 	headBranchRef := headBranch

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7978
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-05-28 14:44:51 +02:00
..
activitypub add port and schema to federation host (#7203) 2025-04-16 08:07:51 +00:00
admin feat: relax email requirements (#7829) 2025-05-22 12:20:25 +02:00
misc feat(sec): Add SSH signing support for instances (#6897) 2025-04-11 13:25:35 +00:00
notify chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org feat: relax email requirements (#7829) 2025-05-22 12:20:25 +02:00
packages chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo chore(cleanup): fix and simplify API comparison helper (#7978) 2025-05-28 14:44:51 +02:00
settings chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
shared chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
swagger feat: sync forks (#2364) 2025-04-07 07:00:38 +00:00
user feat: relax email requirements (#7829) 2025-05-22 12:20:25 +02:00
utils fix: url validation in webhook add/edit API (#7932) 2025-05-23 22:50:43 +02:00
api.go feat: remove API authentication methods that uses the URL query (#7924) 2025-05-23 22:47:43 +02:00