Commit 8dc70db2 authored by Fabio Pitino's avatar Fabio Pitino Committed by Stan Hu

Rename skip_ci field to git_push_options on rebase

Instead of passing `skip_ci` field which is Gitlab
specific notion, pass `git_push_options` to Gitaly
rebase RPC
parent 411a3563
......@@ -1067,6 +1067,9 @@ class Repository
return rebase_deprecated(user, merge_request)
end
push_options = []
push_options << 'ci.skip' if skip_ci
raw.rebase(
user,
merge_request.id,
......@@ -1074,7 +1077,7 @@ class Repository
branch_sha: merge_request.source_branch_sha,
remote_repository: merge_request.target_project.repository.raw,
remote_branch: merge_request.target_branch,
skip_ci: skip_ci
push_options: push_options
) do |commit_id|
merge_request.update!(rebase_commit_sha: commit_id, merge_error: nil)
end
......
......@@ -853,7 +853,7 @@ module Gitlab
end
end
def rebase(user, rebase_id, branch:, branch_sha:, remote_repository:, remote_branch:, skip_ci: false, &block)
def rebase(user, rebase_id, branch:, branch_sha:, remote_repository:, remote_branch:, push_options: [], &block)
wrapped_gitaly_errors do
gitaly_operation_client.rebase(
user,
......@@ -862,7 +862,7 @@ module Gitlab
branch_sha: branch_sha,
remote_repository: remote_repository,
remote_branch: remote_branch,
skip_ci: skip_ci,
push_options: push_options,
&block
)
end
......
......@@ -233,7 +233,7 @@ module Gitlab
end
end
def rebase(user, rebase_id, branch:, branch_sha:, remote_repository:, remote_branch:, skip_ci: false)
def rebase(user, rebase_id, branch:, branch_sha:, remote_repository:, remote_branch:, push_options: [])
request_enum = QueueEnumerator.new
rebase_sha = nil
......@@ -257,7 +257,7 @@ module Gitlab
branch_sha: branch_sha,
remote_repository: remote_repository.gitaly_repository,
remote_branch: encode_binary(remote_branch),
skip_ci: skip_ci
git_push_options: push_options
)
)
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment