loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Deny wrong pull (#13308)

* Deny wrong pull

* Update routers/api/v1/repo/pull.go

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: Markus <git+markus@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>

authored by

M4RKUS-11111
zeripath
Markus
and committed by
GitHub
ff1b0000 c40df54e

+6
+6
routers/api/v1/repo/pull.go
··· 284 284 // "422": 285 285 // "$ref": "#/responses/validationError" 286 286 287 + if form.Head == form.Base { 288 + ctx.Error(http.StatusUnprocessableEntity, "BaseHeadSame", 289 + "Invalid PullRequest: There are no changes between the head and the base") 290 + return 291 + } 292 + 287 293 var ( 288 294 repo = ctx.Repo.Repository 289 295 labelIDs []int64