diff options
Diffstat (limited to 'app/graphql/types/repository/blob_type.rb')
-rw-r--r-- | app/graphql/types/repository/blob_type.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/graphql/types/repository/blob_type.rb b/app/graphql/types/repository/blob_type.rb index 104171e6772..3265c14bdca 100644 --- a/app/graphql/types/repository/blob_type.rb +++ b/app/graphql/types/repository/blob_type.rb @@ -71,6 +71,10 @@ module Types field :pipeline_editor_path, GraphQL::Types::String, null: true, description: 'Web path to edit .gitlab-ci.yml file.' + field :code_owners, [Types::UserType], null: true, + description: 'List of code owners for the blob.', + calls_gitaly: true + field :file_type, GraphQL::Types::String, null: true, description: 'Expected format of the blob based on the extension.' @@ -91,6 +95,9 @@ module Types calls_gitaly: true, description: 'Whether the current user can modify the blob.' + field :can_current_user_push_to_branch, GraphQL::Types::Boolean, null: true, method: :can_current_user_push_to_branch?, + description: 'Whether the current user can push to the branch.' + def raw_text_blob object.data unless object.binary? end @@ -101,3 +108,5 @@ module Types end end end + +Types::Repository::BlobType.prepend_mod_with('Types::Repository::BlobType') |