summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-02-08 03:09:14 +0000
committerGitHub <noreply@github.com>2021-02-08 11:09:14 +0800
commit378acc9d966554299e4a7dbe15e6e41026963653 (patch)
treecfe875029a9c6cb35939fbd0a64ffdc965b2f9b7 /models/issue.go
parent98827e99f63178c43187e686ffc4bf03d9d18d36 (diff)
downloadgitea-378acc9d966554299e4a7dbe15e6e41026963653.tar.gz
gitea-378acc9d966554299e4a7dbe15e6e41026963653.zip
Use OldRef instead of CommitSHA for DeleteBranch comments (#14604)
Fix #14545 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/issue.go b/models/issue.go
index a7392633af..b903e82ad7 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -745,11 +745,11 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc
return err
}
var opts = &CreateCommentOptions{
- Type: CommentTypeDeleteBranch,
- Doer: doer,
- Repo: repo,
- Issue: issue,
- CommitSHA: branchName,
+ Type: CommentTypeDeleteBranch,
+ Doer: doer,
+ Repo: repo,
+ Issue: issue,
+ OldRef: branchName,
}
if _, err = createComment(sess, opts); err != nil {
return err