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:
Diffstat (limited to 'app/models/merge_request_diff_commit.rb')
-rw-r--r--app/models/merge_request_diff_commit.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/merge_request_diff_commit.rb b/app/models/merge_request_diff_commit.rb
index fc08dd4d9c8..790520c4123 100644
--- a/app/models/merge_request_diff_commit.rb
+++ b/app/models/merge_request_diff_commit.rb
@@ -6,13 +6,8 @@ class MergeRequestDiffCommit < ApplicationRecord
include BulkInsertSafe
include ShaAttribute
include CachedCommit
- include IgnorableColumns
include FromUnion
- ignore_column %i[author_name author_email committer_name committer_email],
- remove_with: '14.6',
- remove_after: '2021-11-22'
-
belongs_to :merge_request_diff
# This relation is called `commit_author` and not `author`, as the project
@@ -33,7 +28,6 @@ class MergeRequestDiffCommit < ApplicationRecord
belongs_to :committer, class_name: 'MergeRequest::DiffCommitUser'
sha_attribute :sha
- alias_attribute :id, :sha
attribute :trailers, :ind_jsonb
validates :trailers, json_schema: { filename: 'git_trailers' }
@@ -129,4 +123,8 @@ class MergeRequestDiffCommit < ApplicationRecord
def committer_email
committer&.email
end
+
+ def to_hash
+ super.merge({ 'id' => sha })
+ end
end