summaryrefslogtreecommitdiff
path: root/lib/api/internal.rb
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-09-06 14:35:58 +1000
committerSimon Knox <psimyn@gmail.com>2017-09-06 14:35:58 +1000
commitb9aa55e1ea2ba226bd9bf4c6fb08fdec30e046c5 (patch)
treeb7770180f178086c78ef2ca25d6bb2267f739110 /lib/api/internal.rb
parent74740604211dab6632771f1bfd7dd67902fea7ef (diff)
parentd68ff7f50a93ebbff537b5e795cf6bf80bd66a6e (diff)
downloadgitlab-ce-b9aa55e1ea2ba226bd9bf4c6fb08fdec30e046c5.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ee_issue_928_backport
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r--lib/api/internal.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 8b007869dc3..622bd9650e4 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -68,7 +68,7 @@ module API
end
get "/merge_request_urls" do
- ::MergeRequests::GetUrlsService.new(project).execute(params[:changes])
+ merge_request_urls
end
#
@@ -155,6 +155,21 @@ module API
# render_api_error!(e, 500)
# end
end
+
+ post '/post_receive' do
+ status 200
+
+ PostReceive.perform_async(params[:gl_repository], params[:identifier],
+ params[:changes])
+ broadcast_message = BroadcastMessage.current&.last&.message
+ reference_counter_decreased = Gitlab::ReferenceCounter.new(params[:gl_repository]).decrease
+
+ {
+ merge_request_urls: merge_request_urls,
+ broadcast_message: broadcast_message,
+ reference_counter_decreased: reference_counter_decreased
+ }
+ end
end
end
end