diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/graphql/mutations/commits | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) | |
download | gitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/graphql/mutations/commits')
-rw-r--r-- | app/graphql/mutations/commits/create.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/mutations/commits/create.rb b/app/graphql/mutations/commits/create.rb index 2e06e1ea0c4..f432f679909 100644 --- a/app/graphql/mutations/commits/create.rb +++ b/app/graphql/mutations/commits/create.rb @@ -44,6 +44,11 @@ module Mutations null: true, description: 'The commit after mutation.' + field :content, + [GraphQL::STRING_TYPE], + null: true, + description: 'Contents of the commit.' + authorize :push_code def resolve(project_path:, branch:, message:, actions:, **args) @@ -59,6 +64,7 @@ module Mutations result = ::Files::MultiService.new(project, current_user, attributes).execute { + content: actions.pluck(:content), # rubocop:disable CodeReuse/ActiveRecord because actions is an Array, not a Relation commit: (project.repository.commit(result[:result]) if result[:status] == :success), commit_pipeline_path: UrlHelpers.new.graphql_etag_pipeline_sha_path(result[:result]), errors: Array.wrap(result[:message]) |