diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-11 12:00:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-11 12:00:29 +0800 |
commit | cf0f451c37496c84795e98191a20350e0f5be35c (patch) | |
tree | cea8b11a1a9afbf29f828c6132dc19c07c741bdc /models/issue_comment.go | |
parent | 3576e1ee739cc03f87e6ce98dbef2f32b517b202 (diff) | |
download | gitea-cf0f451c37496c84795e98191a20350e0f5be35c.tar.gz gitea-cf0f451c37496c84795e98191a20350e0f5be35c.zip |
Add delete branch track on pull request comments (#888)
* add delete branch track on pull request comments
* don't change vendor
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 12 |
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 |