686f6855c2
Now the verb comes first, and there is no restriction on singular/plural.
20 lines
514 B
Ruby
20 lines
514 B
Ruby
module Issues
|
|
class CloseService < Issues::BaseService
|
|
def execute(issue, commit = nil)
|
|
if issue.close
|
|
event_service.close_issue(issue, current_user)
|
|
create_note(issue, commit)
|
|
notification_service.close_issue(issue, current_user)
|
|
execute_hooks(issue, 'close')
|
|
end
|
|
|
|
issue
|
|
end
|
|
|
|
private
|
|
|
|
def create_note(issue, current_commit)
|
|
SystemNoteService.change_status(issue, issue.project, current_user, issue.state, current_commit)
|
|
end
|
|
end
|
|
end
|