summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index e011f5f0d5..2eadba810b 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -44,6 +44,8 @@ const (
CommentTypeAssignees
// Change Title
CommentTypeChangeTitle
+ // Delete Branch
+ CommentTypeDeleteBranch
)
// CommentTag defines comment tag type
@@ -472,6 +474,16 @@ func createChangeTitleComment(e *xorm.Session, doer *User, repo *Repository, iss
})
}
+func createDeleteBranchComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue, branchName string) (*Comment, error) {
+ return createComment(e, &CreateCommentOptions{
+ Type: CommentTypeDeleteBranch,
+ Doer: doer,
+ Repo: repo,
+ Issue: issue,
+ CommitSHA: branchName,
+ })
+}
+
// CreateCommentOptions defines options for creating comment
type CreateCommentOptions struct {
Type CommentType