diff --git a/server/controllers/api_controller.go b/server/controllers/api_controller.go index 3138419146..5cc6f3520a 100644 --- a/server/controllers/api_controller.go +++ b/server/controllers/api_controller.go @@ -36,6 +36,7 @@ type APIRequest struct { Repository string `validate:"required"` Ref string `validate:"required"` Type string `validate:"required"` + PR int Projects []string Paths []struct { Directory string @@ -214,7 +215,7 @@ func (a *APIController) apiParseAndValidate(r *http.Request) (*APIRequest, *comm return &request, &command.Context{ HeadRepo: baseRepo, Pull: models.PullRequest{ - Num: 0, + Num: request.PR, BaseBranch: request.Ref, HeadBranch: request.Ref, HeadCommit: request.Ref,