diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-07-11 17:48:59 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-07-11 17:48:59 +0300 |
commit | 09193a4fe18044a61021afef1282ec60b81810b1 (patch) | |
tree | ec6107dd34bacca03bd71e6a04a5eb528d5d2dc7 /app | |
parent | 9e4e1afb4a7907f2a79d18fd9b5d03c9f6599ccf (diff) |
Convert target branch link to use tree
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js | 2 | ||||
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 4 | ||||
-rw-r--r-- | app/serializers/merge_request_entity.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js index 69bc1436284..d4ef5972ce0 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js @@ -47,7 +47,7 @@ export default class MergeRequestStore { this.sourceBranchPath = data.source_branch_path; this.sourceBranchLink = data.source_branch_with_namespace_link; this.mergeError = data.merge_error; - this.targetBranchPath = data.target_branch_commits_path; + this.targetBranchPath = data.target_branch_tree_path; this.conflictResolutionPath = data.conflict_resolution_path; this.cancelAutoMergePath = data.cancel_merge_when_pipeline_succeeds_path; this.removeWIPPath = data.remove_wip_path; diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index 101568b66b7..4084a982071 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -76,9 +76,9 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated end end - def target_branch_commits_path + def target_branch_tree_path if target_branch_exists? - project_commits_path(project, target_branch) + project_tree_path(project, target_branch) end end diff --git a/app/serializers/merge_request_entity.rb b/app/serializers/merge_request_entity.rb index 7ec2dbd0efe..fb6709699a7 100644 --- a/app/serializers/merge_request_entity.rb +++ b/app/serializers/merge_request_entity.rb @@ -93,8 +93,8 @@ class MergeRequestEntity < IssuableEntity # Paths # - expose :target_branch_commits_path do |merge_request| - presenter(merge_request).target_branch_commits_path + expose :target_branch_tree_path do |merge_request| + presenter(merge_request).target_branch_tree_path end expose :new_blob_path do |merge_request| |