mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Updates to the API for archived repos (#27149)
This commit is contained in:
@@ -282,6 +282,8 @@ func CreatePullRequest(ctx *context.APIContext) {
|
||||
// "$ref": "#/responses/error"
|
||||
// "422":
|
||||
// "$ref": "#/responses/validationError"
|
||||
// "423":
|
||||
// "$ref": "#/responses/repoArchivedError"
|
||||
|
||||
form := *web.GetForm(ctx).(*api.CreatePullRequestOption)
|
||||
if form.Head == form.Base {
|
||||
@@ -741,6 +743,8 @@ func MergePullRequest(ctx *context.APIContext) {
|
||||
// "$ref": "#/responses/empty"
|
||||
// "409":
|
||||
// "$ref": "#/responses/error"
|
||||
// "423":
|
||||
// "$ref": "#/responses/repoArchivedError"
|
||||
|
||||
form := web.GetForm(ctx).(*forms.MergePullRequestForm)
|
||||
|
||||
@@ -1196,6 +1200,8 @@ func CancelScheduledAutoMerge(ctx *context.APIContext) {
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "423":
|
||||
// "$ref": "#/responses/repoArchivedError"
|
||||
|
||||
pullIndex := ctx.ParamsInt64(":index")
|
||||
pull, err := issues_model.GetPullRequestByIndex(ctx, ctx.Repo.Repository.ID, pullIndex)
|
||||
|
Reference in New Issue
Block a user