Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-11-14 20:55:00 +0300
committerRémy Coutable <remy@rymai.me>2017-11-15 17:42:19 +0300
commit05c10c9bf77db2a9e37e61d1953ef0150289322d (patch)
treeaf7d820349678773d5b0835d652425e70dbffe80 /app/services/issues
parenta4072db0198896242886d22c644ed91c1016aa8d (diff)
Add total_time_spent to the `changes` hash in issuable Webhook payloads
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services/issues')
-rw-r--r--app/services/issues/base_service.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb
index b680eaf5a49..0f711bcc3cf 100644
--- a/app/services/issues/base_service.rb
+++ b/app/services/issues/base_service.rb
@@ -1,7 +1,7 @@
module Issues
class BaseService < ::IssuableBaseService
- def hook_data(issue, action, old_labels: [], old_assignees: [])
- hook_data = issue.to_hook_data(current_user, old_labels: old_labels, old_assignees: old_assignees)
+ def hook_data(issue, action, old_labels: [], old_assignees: [], old_total_time_spent: nil)
+ hook_data = issue.to_hook_data(current_user, old_labels: old_labels, old_assignees: old_assignees, old_total_time_spent: old_total_time_spent)
hook_data[:object_attributes][:action] = action
hook_data
@@ -22,8 +22,8 @@ module Issues
issue, issue.project, current_user, old_assignees)
end
- def execute_hooks(issue, action = 'open', old_labels: [], old_assignees: [])
- issue_data = hook_data(issue, action, old_labels: old_labels, old_assignees: old_assignees)
+ def execute_hooks(issue, action = 'open', old_labels: [], old_assignees: [], old_total_time_spent: nil)
+ issue_data = hook_data(issue, action, old_labels: old_labels, old_assignees: old_assignees, old_total_time_spent: old_total_time_spent)
hooks_scope = issue.confidential? ? :confidential_issue_hooks : :issue_hooks
issue.project.execute_hooks(issue_data, hooks_scope)
issue.project.execute_services(issue_data, hooks_scope)