修改gitlab api接口
This commit is contained in:
parent
87c5f50545
commit
dcdc09d864
|
@ -148,7 +148,7 @@ class PullRequestsController < ApplicationController
|
|||
def create_pull_request_comment
|
||||
content = params[:pull_request_comment]
|
||||
begin
|
||||
@comments = @g.create_merge_request_comment(@project.gpid, params[:id], content)
|
||||
@comments = @g.create_merge_request_comment(@project.gpid, params[:id], content, User.current.gid)
|
||||
respond_to do |format|
|
||||
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
||||
end
|
||||
|
|
|
@ -78,8 +78,8 @@ class Gitlab::Client
|
|||
# @param [Integer] id The ID of a merge request.
|
||||
# @param [String] note The content of a comment.
|
||||
# @return [Gitlab::ObjectifiedHash] Information about created merge request comment.
|
||||
def create_merge_request_comment(project, id, note)
|
||||
post("/projects/#{project}/merge_request/#{id}/comments", :body => {:note => note})
|
||||
def create_merge_request_comment(project, id, note, gid)
|
||||
post("/projects/#{project}/merge_request/#{id}/comments?user_id=#{gid}", :body => {:note => note})
|
||||
end
|
||||
|
||||
# Get a list of merge request commits.
|
||||
|
|
Loading…
Reference in New Issue