45e1941fb3
When a webhook for issues is triggered, it should also return the resource URL, and the action that was performed (ie: Was it reopened, updated, opened or closed)
17 lines
430 B
Ruby
17 lines
430 B
Ruby
module Issues
|
|
class CreateService < Issues::BaseService
|
|
def execute
|
|
issue = project.issues.new(params)
|
|
issue.author = current_user
|
|
|
|
if issue.save
|
|
notification_service.new_issue(issue, current_user)
|
|
event_service.open_issue(issue, current_user)
|
|
issue.create_cross_references!(issue.project, current_user)
|
|
execute_hooks(issue, 'open')
|
|
end
|
|
|
|
issue
|
|
end
|
|
end
|
|
end
|