diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/graphql/mutations/commits | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/graphql/mutations/commits')
-rw-r--r-- | app/graphql/mutations/commits/create.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/graphql/mutations/commits/create.rb b/app/graphql/mutations/commits/create.rb index 84933fee5d2..2e06e1ea0c4 100644 --- a/app/graphql/mutations/commits/create.rb +++ b/app/graphql/mutations/commits/create.rb @@ -5,6 +5,11 @@ module Mutations class Create < BaseMutation include FindsProject + class UrlHelpers + include GitlabRoutingHelper + include Gitlab::Routing + end + graphql_name 'CommitCreate' argument :project_path, GraphQL::ID_TYPE, @@ -29,6 +34,11 @@ module Mutations required: true, description: 'Array of action hashes to commit as a batch.' + field :commit_pipeline_path, + GraphQL::STRING_TYPE, + null: true, + description: "ETag path for the commit's pipeline." + field :commit, Types::CommitType, null: true, @@ -50,6 +60,7 @@ module Mutations { 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]) } end |