debian-mirror-gitlab/app/services/merge_requests/ff_merge_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
750 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module MergeRequests
# MergeService class
#
# Do git fast-forward merge and in case of success
# mark merge request as merged and execute all hooks and notifications
# Executed when you do fast-forward merge via GitLab UI
#
class FfMergeService < MergeRequests::MergeService
2022-10-11 01:57:18 +05:30
extend ::Gitlab::Utils::Override
2018-03-17 18:26:18 +05:30
2022-10-11 01:57:18 +05:30
private
2019-12-26 22:10:19 +05:30
2022-10-11 01:57:18 +05:30
override :execute_git_merge
def execute_git_merge
2023-07-09 08:55:56 +05:30
repository.ff_merge(
current_user,
source,
merge_request.target_branch,
merge_request: merge_request
)
2022-10-11 01:57:18 +05:30
end
2019-12-26 22:10:19 +05:30
2022-10-11 01:57:18 +05:30
override :merge_success_data
def merge_success_data(commit_id)
# There is no merge commit to update, so this is just blank.
{}
2018-03-17 18:26:18 +05:30
end
end
end