Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
1804227b4f
commit
e16c0f461f
10 changed files with 79 additions and 41 deletions
5
changelogs/unreleased/refactoring-entities-file-13.yml
Normal file
5
changelogs/unreleased/refactoring-entities-file-13.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Separate note entities into own class files
|
||||||
|
merge_request: 24732
|
||||||
|
author: Rajendra Kadam
|
||||||
|
type: added
|
|
@ -209,7 +209,11 @@ praefect['database_dbname'] = 'praefect_production'
|
||||||
Replace `POSTGRESQL_SERVER_ADDRESS`, `PRAEFECT_EXTERNAL_TOKEN`, `PRAEFECT_INTERNAL_TOKEN`,
|
Replace `POSTGRESQL_SERVER_ADDRESS`, `PRAEFECT_EXTERNAL_TOKEN`, `PRAEFECT_INTERNAL_TOKEN`,
|
||||||
and `PRAEFECT_SQL_PASSWORD` with their respective values.
|
and `PRAEFECT_SQL_PASSWORD` with their respective values.
|
||||||
|
|
||||||
Save the file and [reconfigure Praefect](../restart_gitlab.md#omnibus-gitlab-reconfigure).
|
Save the file and reconfigure Praefect:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo gitlab-ctl reconfigure
|
||||||
|
```
|
||||||
|
|
||||||
After you reconfigure, verify that Praefect can reach PostgreSQL:
|
After you reconfigure, verify that Praefect can reach PostgreSQL:
|
||||||
|
|
||||||
|
@ -328,7 +332,11 @@ with their respective values.
|
||||||
Note that the storage name used is the same as the `praefect['virtual_storage_name']` set
|
Note that the storage name used is the same as the `praefect['virtual_storage_name']` set
|
||||||
on the Praefect node.
|
on the Praefect node.
|
||||||
|
|
||||||
Save your changes and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure).
|
Save your changes and reconfigure GitLab:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo gitlab-ctl reconfigure
|
||||||
|
```
|
||||||
|
|
||||||
Run `sudo gitlab-rake gitlab:gitaly:check` to confirm that GitLab can reach Praefect.
|
Run `sudo gitlab-rake gitlab:gitaly:check` to confirm that GitLab can reach Praefect.
|
||||||
|
|
||||||
|
|
|
@ -129,40 +129,6 @@ module API
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Avatar < Grape::Entity
|
|
||||||
expose :avatar_url do |avatarable, options|
|
|
||||||
avatarable.avatar_url(only_path: false, size: options[:size])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class AwardEmoji < Grape::Entity
|
|
||||||
expose :id
|
|
||||||
expose :name
|
|
||||||
expose :user, using: Entities::UserBasic
|
|
||||||
expose :created_at, :updated_at
|
|
||||||
expose :awardable_id, :awardable_type
|
|
||||||
end
|
|
||||||
|
|
||||||
class MRNote < Grape::Entity
|
|
||||||
expose :note
|
|
||||||
expose :author, using: Entities::UserBasic
|
|
||||||
end
|
|
||||||
|
|
||||||
class CommitNote < Grape::Entity
|
|
||||||
expose :note
|
|
||||||
expose(:path) { |note| note.diff_file.try(:file_path) if note.diff_note? }
|
|
||||||
expose(:line) { |note| note.diff_line.try(:new_line) if note.diff_note? }
|
|
||||||
expose(:line_type) { |note| note.diff_line.try(:type) if note.diff_note? }
|
|
||||||
expose :author, using: Entities::UserBasic
|
|
||||||
expose :created_at
|
|
||||||
end
|
|
||||||
|
|
||||||
class CommitStatus < Grape::Entity
|
|
||||||
expose :id, :sha, :ref, :status, :name, :target_url, :description,
|
|
||||||
:created_at, :started_at, :finished_at, :allow_failure, :coverage
|
|
||||||
expose :author, using: Entities::UserBasic
|
|
||||||
end
|
|
||||||
|
|
||||||
class PushEventPayload < Grape::Entity
|
class PushEventPayload < Grape::Entity
|
||||||
expose :commit_count, :action, :ref_type, :commit_from, :commit_to, :ref,
|
expose :commit_count, :action, :ref_type, :commit_from, :commit_to, :ref,
|
||||||
:commit_title, :ref_count
|
:commit_title, :ref_count
|
||||||
|
|
11
lib/api/entities/avatar.rb
Normal file
11
lib/api/entities/avatar.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module API
|
||||||
|
module Entities
|
||||||
|
class Avatar < Grape::Entity
|
||||||
|
expose :avatar_url do |avatarable, options|
|
||||||
|
avatarable.avatar_url(only_path: false, size: options[:size])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
lib/api/entities/award_emoji.rb
Normal file
13
lib/api/entities/award_emoji.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module API
|
||||||
|
module Entities
|
||||||
|
class AwardEmoji < Grape::Entity
|
||||||
|
expose :id
|
||||||
|
expose :name
|
||||||
|
expose :user, using: Entities::UserBasic
|
||||||
|
expose :created_at, :updated_at
|
||||||
|
expose :awardable_id, :awardable_type
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
14
lib/api/entities/commit_note.rb
Normal file
14
lib/api/entities/commit_note.rb
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module API
|
||||||
|
module Entities
|
||||||
|
class CommitNote < Grape::Entity
|
||||||
|
expose :note
|
||||||
|
expose(:path) { |note| note.diff_file.try(:file_path) if note.diff_note? }
|
||||||
|
expose(:line) { |note| note.diff_line.try(:new_line) if note.diff_note? }
|
||||||
|
expose(:line_type) { |note| note.diff_line.try(:type) if note.diff_note? }
|
||||||
|
expose :author, using: Entities::UserBasic
|
||||||
|
expose :created_at
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
11
lib/api/entities/commit_status.rb
Normal file
11
lib/api/entities/commit_status.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module API
|
||||||
|
module Entities
|
||||||
|
class CommitStatus < Grape::Entity
|
||||||
|
expose :id, :sha, :ref, :status, :name, :target_url, :description,
|
||||||
|
:created_at, :started_at, :finished_at, :allow_failure, :coverage
|
||||||
|
expose :author, using: Entities::UserBasic
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
10
lib/api/entities/mr_note.rb
Normal file
10
lib/api/entities/mr_note.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module API
|
||||||
|
module Entities
|
||||||
|
class MRNote < Grape::Entity
|
||||||
|
expose :note
|
||||||
|
expose :author, using: Entities::UserBasic
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -43,7 +43,7 @@
|
||||||
"@gitlab/ui": "^9.4.1",
|
"@gitlab/ui": "^9.4.1",
|
||||||
"@gitlab/visual-review-tools": "1.5.1",
|
"@gitlab/visual-review-tools": "1.5.1",
|
||||||
"@sentry/browser": "^5.10.2",
|
"@sentry/browser": "^5.10.2",
|
||||||
"@sourcegraph/code-host-integration": "0.0.29",
|
"@sourcegraph/code-host-integration": "0.0.30",
|
||||||
"apollo-cache-inmemory": "^1.6.3",
|
"apollo-cache-inmemory": "^1.6.3",
|
||||||
"apollo-client": "^2.6.4",
|
"apollo-client": "^2.6.4",
|
||||||
"apollo-link": "^1.2.11",
|
"apollo-link": "^1.2.11",
|
||||||
|
|
|
@ -989,10 +989,10 @@
|
||||||
"@sentry/types" "5.10.0"
|
"@sentry/types" "5.10.0"
|
||||||
tslib "^1.9.3"
|
tslib "^1.9.3"
|
||||||
|
|
||||||
"@sourcegraph/code-host-integration@0.0.29":
|
"@sourcegraph/code-host-integration@0.0.30":
|
||||||
version "0.0.29"
|
version "0.0.30"
|
||||||
resolved "https://registry.yarnpkg.com/@sourcegraph/code-host-integration/-/code-host-integration-0.0.29.tgz#71b4392ad9bd4527f5baddc32bb90fda5c00a9c7"
|
resolved "https://registry.yarnpkg.com/@sourcegraph/code-host-integration/-/code-host-integration-0.0.30.tgz#85f52eca0f8fd5efb1526a7ec6a09d261ab43bda"
|
||||||
integrity sha512-YtCZSuiBTUzlk2ku9xIHPbEIBYfwNtdZQCVaEL1AvMG0Ds0tEDBiiRdW/ZpdYjskOGwslv2wkKC2sGE/zUUrIQ==
|
integrity sha512-5zBN0/oa1c0lY0+MPb2kEs9NqefvOg0NevDQXqQpLHDOx+TtMzC2uEOQiBnyHm2bWcCl/RFatjvNlEV+reGgnA==
|
||||||
|
|
||||||
"@types/anymatch@*":
|
"@types/anymatch@*":
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
|
|
Loading…
Reference in a new issue