@ -14,13 +14,13 @@ import (
)
// ChangeStatus changes issue status to open or closed.
func ChangeStatus ( issue * issues_model . Issue , doer * user_model . User , c losed bool ) error {
return changeStatusCtx ( db . DefaultContext , issue , doer , c losed)
func ChangeStatus ( issue * issues_model . Issue , doer * user_model . User , c ommitID string , c losed bool ) error {
return changeStatusCtx ( db . DefaultContext , issue , doer , c ommitID, c losed)
}
// changeStatusCtx changes issue status to open or closed.
// TODO: if context is not db.DefaultContext we get a deadlock!!!
func changeStatusCtx ( ctx context . Context , issue * issues_model . Issue , doer * user_model . User , c losed bool ) error {
func changeStatusCtx ( ctx context . Context , issue * issues_model . Issue , doer * user_model . User , c ommitID string , c losed bool ) error {
comment , err := issues_model . ChangeIssueStatus ( ctx , issue , doer , closed )
if err != nil {
if issues_model . IsErrDependenciesLeft ( err ) && closed {
@ -37,7 +37,7 @@ func changeStatusCtx(ctx context.Context, issue *issues_model.Issue, doer *user_
}
}
notification . NotifyIssueChangeStatus ( ctx , doer , issue, comment , closed )
notification . NotifyIssueChangeStatus ( ctx , doer , commitID, issue, comment , closed )
return nil
}