jojo/routers/api/v1
abdo e16dc2ebfd fix: apply signed-merge checks by merge style (#11403)
Fixes #6438

When a protected branch requires signed commits and no signing key is available, fast-forward-only merges should still be allowed because they do not create a new commit.

This patch applies signing checks by merge behaviour/style instead of one global gate:

- pass `mergeStyle` through `CheckPullMergeable(...)` in web/API/automerge paths
- require signing for commit-creating styles (`merge`, `rebase`, `rebase-merge`, `squash`)
- bypass signing precheck only for `fast-forward-only`
- align merge UI options with backend behaviour so signing-dependent styles are unavailable when signing cannot happen
- add Go unit tests for merge-style signing requirements
- add frontend unit coverage for the no-allowed-merge-styles guard

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11403
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: abdo <dev@abdo.wtf>
Co-committed-by: abdo <dev@abdo.wtf>
2026-04-09 20:26:27 +02:00
..
activitypub chore: update github.com/go-ap/activitypub to 902f6cf (#11301) 2026-04-02 23:57:13 +02:00
admin feat: add visible flag to HTTP API endpoints that return runners (#11670) 2026-03-14 04:22:01 +01:00
misc feat(sec): Add SSH signing support for instances (#6897) 2025-04-11 13:25:35 +00:00
notify feat: remove admin-level permissions from repo-specific & public-only access tokens (#11468) 2026-03-04 16:17:41 +01:00
org feat: add visible flag to HTTP API endpoints that return runners (#11670) 2026-03-14 04:22:01 +01:00
packages fix(api): package name in route not properly unescaped (#11822) 2026-03-26 15:30:16 +01:00
repo fix: apply signed-merge checks by merge style (#11403) 2026-04-09 20:26:27 +02:00
settings chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
shared feat: add /actions/runs/{id}/jobs (#11915) 2026-04-06 03:43:41 +02:00
swagger feat: add /actions/runs/{id}/jobs (#11915) 2026-04-06 03:43:41 +02:00
user feat(ui): create repo-specific access tokens (#11696) 2026-03-23 15:29:08 +01:00
utils feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00
api.go feat: add /actions/runs/{id}/jobs (#11915) 2026-04-06 03:43:41 +02:00