|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
|
|
|
|
|
class PullRequestsController < ApplicationController
|
|
|
|
|
before_filter :authorize_logged
|
|
|
|
|
before_filter :find_project_and_repository
|
|
|
|
|
before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes, :new,
|
|
|
|
|
:update_pull_request, :pull_request_comments, :create_pull_request_comment]
|
|
|
|
|
|
|
|
|
|
layout "base_projects"
|
|
|
|
|
include PullRequestsHelper
|
|
|
|
|
include ApplicationHelper
|
|
|
|
@ -235,6 +237,13 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
def authorize_logged
|
|
|
|
|
if !User.current.logged?
|
|
|
|
|
redirect_to signin_path
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def connect_gitlab
|
|
|
|
|
@g = Gitlab.client
|
|
|
|
|
end
|
|
|
|
|