Skip to content

Commit dbb22f8

Browse files
author
Gusted
committed
Remove invalid argument
1 parent 5558a74 commit dbb22f8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

models/issues/issue.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,7 @@ func doChangeIssueStatus(ctx context.Context, issue *Issue, doer *user_model.Use
743743
}
744744

745745
// ChangeIssueStatus changes issue status to open or closed.
746-
func ChangeIssueStatus(ctx context.Context, issue *Issue, repoID int64, doer *user_model.User, isClosed bool) (*Comment, error) {
747-
if issue.RepoID != repoID {
748-
return nil, fmt.Errorf("issue's repository is not correct")
749-
}
746+
func ChangeIssueStatus(ctx context.Context, issue *Issue, doer *user_model.User, isClosed bool) (*Comment, error) {
750747
if err := issue.LoadRepo(ctx); err != nil {
751748
return nil, err
752749
}

services/issue/status.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import (
1515
)
1616

1717
// ChangeStatus changes issue status to open or closed.
18-
func ChangeStatus(issue *issues_model.Issue, repoID int64, doer *user_model.User, closed bool) error {
19-
return changeStatusCtx(db.DefaultContext, issue, repoID, doer, closed)
18+
func ChangeStatus(issue *issues_model.Issue, doer *user_model.User, closed bool) error {
19+
return changeStatusCtx(db.DefaultContext, issue, doer, closed)
2020
}
2121

2222
// changeStatusCtx changes issue status to open or closed.
2323
// TODO: if context is not db.DefaultContext we get a deadlock!!!
24-
func changeStatusCtx(ctx context.Context, issue *issues_model.Issue, repoID int64, doer *user_model.User, closed bool) error {
24+
func changeStatusCtx(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, closed bool) error {
2525
comment, err := issues_model.ChangeIssueStatus(ctx, issue, doer, closed)
2626
if err != nil {
2727
if issues_model.IsErrDependenciesLeft(err) && closed {

0 commit comments

Comments
 (0)