关闭和打开的时候显示root问题

This commit is contained in:
huang 2016-08-13 16:43:00 +08:00
parent d7faed7f6d
commit 966722b920
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ class PullRequestsController < ApplicationController
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
def update_pull_request
begin
@g.update_merge_request(@project.gpid, params[:id], :state_event => params[:state])
@g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
respond_to do |format|
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
end

View File

@ -64,8 +64,8 @@ class Gitlab::Client
# @option options [Integer] :assignee_id The ID of a user to assign merge request.
# @option options [String] :state_event New state (close|reopen|merge).
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
def update_merge_request(project, id, options={})
put("/projects/#{project}/merge_request/#{id}", :body => options)
def update_merge_request(project, id, gid, options={})
put("/projects/#{project}/merge_request/#{id}?user_id=#{gid}", :body => options)
end
# Adds a comment to a merge request.