mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-01 07:37:50 +08:00
Webhooks: for issue close/reopen action, add commit ID that caused it (#22583)
The `commit_id` property name is the same as equivalent functionality in GitHub. If the action was not caused by a commit, an empty string is used. This can for example be used to automatically add a Resolved label to an issue fixed by a commit, or clear it when the issue is reopened.
This commit is contained in:

committed by
GitHub

parent
a31fedd2c2
commit
c8139c0f64
@ -193,7 +193,7 @@ func UpdateIssuesCommit(doer *user_model.User, repo *repo_model.Repository, comm
|
||||
}
|
||||
if close != refIssue.IsClosed {
|
||||
refIssue.Repo = refRepo
|
||||
if err := ChangeStatus(refIssue, doer, close); err != nil {
|
||||
if err := ChangeStatus(refIssue, doer, c.Sha1, close); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user