redirect from issue to pull request and vice versa

This commit is contained in:
Alexander Machehin 2013-07-22 22:54:59 +06:00
parent 5947030325
commit 854f324627
3 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,7 @@ class Api::V1::IssuesController < Api::V1::BaseController
end end
def show def show
redirect_to api_v1_project_pull_request_path(@project.id, @issue.serial_id) if @issue.pull_request
end end
def create def create

View File

@ -39,6 +39,7 @@ class Api::V1::PullRequestsController < Api::V1::BaseController
end end
def show def show
redirect_to api_v1_project_issue_path(@project.id, @issue.serial_id) if @pull.nil?
end end
def create def create

View File

@ -79,7 +79,11 @@ class Projects::PullRequestsController < Projects::BaseController
end end
def show def show
load_diff_commits_data if @pull.nil?
redirect_to project_issue_path(@project, @issue)
else
load_diff_commits_data
end
end end
def index(status = 200) def index(status = 200)