summaryrefslogtreecommitdiff
path: root/lib/gitlab/hook_data
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/hook_data')
-rw-r--r--lib/gitlab/hook_data/issue_builder.rb3
-rw-r--r--lib/gitlab/hook_data/merge_request_builder.rb3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/hook_data/issue_builder.rb b/lib/gitlab/hook_data/issue_builder.rb
index d5595e80bdf..2d1bb515058 100644
--- a/lib/gitlab/hook_data/issue_builder.rb
+++ b/lib/gitlab/hook_data/issue_builder.rb
@@ -7,6 +7,7 @@ module Gitlab
assignees
labels
total_time_spent
+ time_change
].freeze
def self.safe_hook_attributes
@@ -43,7 +44,9 @@ module Gitlab
description: absolute_image_urls(issue.description),
url: Gitlab::UrlBuilder.build(issue),
total_time_spent: issue.total_time_spent,
+ time_change: issue.time_change,
human_total_time_spent: issue.human_total_time_spent,
+ human_time_change: issue.human_time_change,
human_time_estimate: issue.human_time_estimate,
assignee_ids: issue.assignee_ids,
assignee_id: issue.assignee_ids.first, # This key is deprecated
diff --git a/lib/gitlab/hook_data/merge_request_builder.rb b/lib/gitlab/hook_data/merge_request_builder.rb
index ae2ec424ce5..db807a3c557 100644
--- a/lib/gitlab/hook_data/merge_request_builder.rb
+++ b/lib/gitlab/hook_data/merge_request_builder.rb
@@ -37,6 +37,7 @@ module Gitlab
assignees
labels
total_time_spent
+ time_change
].freeze
alias_method :merge_request, :object
@@ -50,7 +51,9 @@ module Gitlab
last_commit: merge_request.diff_head_commit&.hook_attrs,
work_in_progress: merge_request.work_in_progress?,
total_time_spent: merge_request.total_time_spent,
+ time_change: merge_request.time_change,
human_total_time_spent: merge_request.human_total_time_spent,
+ human_time_change: merge_request.human_time_change,
human_time_estimate: merge_request.human_time_estimate,
assignee_ids: merge_request.assignee_ids,
assignee_id: merge_request.assignee_ids.first, # This key is deprecated