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
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue