mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
call notifier after merging a pr
This commit is contained in:
@@ -720,7 +720,7 @@ func CreateIssue(ctx *context.APIContext) {
|
||||
}
|
||||
|
||||
if form.Closed {
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", true); err != nil {
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", true, false); err != nil {
|
||||
if issues_model.IsErrDependenciesLeft(err) {
|
||||
ctx.Error(http.StatusPreconditionFailed, "DependenciesLeft", "cannot close this issue because it still has open dependencies")
|
||||
return
|
||||
|
||||
@@ -242,7 +242,8 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
|
||||
}
|
||||
|
||||
var isShowClosed optional.Option[bool]
|
||||
switch ctx.FormString("state") {
|
||||
stateVal := ctx.FormString("state")
|
||||
switch stateVal {
|
||||
case "closed":
|
||||
isShowClosed = optional.Some(true)
|
||||
case "all":
|
||||
@@ -2924,7 +2925,7 @@ func UpdateIssueStatus(ctx *context.Context) {
|
||||
continue
|
||||
}
|
||||
if issue.IsClosed != isClosed {
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", isClosed); err != nil {
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", isClosed, false); err != nil {
|
||||
if issues_model.IsErrDependenciesLeft(err) {
|
||||
ctx.JSON(http.StatusPreconditionFailed, map[string]any{
|
||||
"error": ctx.Tr("repo.issues.dependency.issue_batch_close_blocked", issue.Index),
|
||||
@@ -3068,7 +3069,7 @@ func NewComment(ctx *context.Context) {
|
||||
ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index))
|
||||
} else {
|
||||
isClosed := form.Status == "close"
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", isClosed); err != nil {
|
||||
if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", isClosed, false); err != nil {
|
||||
log.Error("ChangeStatus: %v", err)
|
||||
|
||||
if issues_model.IsErrDependenciesLeft(err) {
|
||||
|
||||
Reference in New Issue
Block a user