diff --git a/pagure/internal/__init__.py b/pagure/internal/__init__.py index 0cc64c2..7b82449 100644 --- a/pagure/internal/__init__.py +++ b/pagure/internal/__init__.py @@ -330,7 +330,8 @@ def get_pull_request_ready_branch(): branches_pr = {} for pr in prs: if pr.branch_from in branches: - branches_pr[pr.branch_from] = pr.id + branches_pr[pr.branch_from] = '%s/pull-request/%s' % ( + pr.project.url_path, pr.id) del(branches[pr.branch_from]) return flask.jsonify( diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index c543929..aca0684 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -357,18 +357,11 @@ $(function() { $('[data-toggle="tooltip"]').tooltip({placement : 'bottom'}); } for (branch in res.message.branch_w_pr){ - var url = "{{ url_for( - 'ui_ns.request_pull', - repo=repo.name, - username=None, - namespace=repo.namespace, - requestid=-100) }}"; - url = url.replace(-100, res.message.branch_w_pr[branch]); var html = ' \ - ' - + 'PR#' + res.message.branch_w_pr[branch] + ' \ + ' + + 'PR#' + res.message.branch_w_pr[branch].split('/').slice(-1)[0] + ' \ '; $('#branch-' + branch.replace(/\./g, '\\.').replace('/', '__') + ' .branch_del').prepend(html); diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py index 5a02e97..08d8265 100644 --- a/tests/test_pagure_flask_ui_fork.py +++ b/tests/test_pagure_flask_ui_fork.py @@ -2697,7 +2697,7 @@ index 0000000..2a552bb "code": "OK", "message": { "branch_w_pr": { - "feature": 1 + "feature": "test/pull-request/1" }, "new_branch": {} }