redirect from issue to pull request and vice versa
This commit is contained in:
parent
5947030325
commit
854f324627
|
@ -34,6 +34,7 @@ class Api::V1::IssuesController < Api::V1::BaseController
|
|||
end
|
||||
|
||||
def show
|
||||
redirect_to api_v1_project_pull_request_path(@project.id, @issue.serial_id) if @issue.pull_request
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -39,6 +39,7 @@ class Api::V1::PullRequestsController < Api::V1::BaseController
|
|||
end
|
||||
|
||||
def show
|
||||
redirect_to api_v1_project_issue_path(@project.id, @issue.serial_id) if @pull.nil?
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -79,7 +79,11 @@ class Projects::PullRequestsController < Projects::BaseController
|
|||
end
|
||||
|
||||
def show
|
||||
load_diff_commits_data
|
||||
if @pull.nil?
|
||||
redirect_to project_issue_path(@project, @issue)
|
||||
else
|
||||
load_diff_commits_data
|
||||
end
|
||||
end
|
||||
|
||||
def index(status = 200)
|
||||
|
|
Loading…
Reference in New Issue