|
|
|
@ -97,6 +97,13 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
@changes_count = @changes.count
|
|
|
|
|
@comments = @g.merge_request_comments(@project.gpid, params[:id])
|
|
|
|
|
@comments_count = @comments.count
|
|
|
|
|
|
|
|
|
|
@limit = 10
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@count = @comments_count
|
|
|
|
|
@pages = Paginator.new @count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @pages.offset
|
|
|
|
|
@comments = paginateHelper @comments, 10
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Accept a merge request.
|
|
|
|
@ -171,6 +178,14 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
def pull_request_comments
|
|
|
|
|
begin
|
|
|
|
|
@comments = @g.merge_request_comments(@project.gpid, params[:id])
|
|
|
|
|
@comments_count = @comments.count
|
|
|
|
|
|
|
|
|
|
@limit = 10
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@count = @comments_count
|
|
|
|
|
@pages = Paginator.new @count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @pages.offset
|
|
|
|
|
@comments = paginateHelper @comments, 10
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
@message = e.message
|
|
|
|
|
end
|
|
|
|
@ -184,6 +199,13 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
begin
|
|
|
|
|
@commits = @g.merge_request_commits(@project.gpid, params[:id])
|
|
|
|
|
@commits_count = @commits.count
|
|
|
|
|
|
|
|
|
|
@limit = 10
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@count = @commits_count
|
|
|
|
|
@pages = Paginator.new @count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @pages.offset
|
|
|
|
|
@commits = paginateHelper @commits, 10
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
@message = e.message
|
|
|
|
|
end
|
|
|
|
@ -197,6 +219,13 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
begin
|
|
|
|
|
@changes = @g.merge_request_changes(@project.gpid, params[:id]).try(:changes)
|
|
|
|
|
@changes_count = @changes.count
|
|
|
|
|
|
|
|
|
|
@limit = 10
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@count = @changes_count
|
|
|
|
|
@pages = Paginator.new @count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @pages.offset
|
|
|
|
|
@changes = paginateHelper @changes, 10
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
@message = e.message
|
|
|
|
|
end
|
|
|
|
|