Show More
@@ -96,6 +96,9 b' def get_pull_request(request, apiuser, r' | |||
|
96 | 96 | "commit_id": "<commit_id>", |
|
97 | 97 | } |
|
98 | 98 | }, |
|
99 | "shadow": { | |
|
100 | "clone_url": "<clone_url>", | |
|
101 | }, | |
|
99 | 102 | "author": <user_obj>, |
|
100 | 103 | "reviewers": [ |
|
101 | 104 | ... |
@@ -178,6 +181,9 b' def get_pull_requests(request, apiuser, ' | |||
|
178 | 181 | "commit_id": "<commit_id>", |
|
179 | 182 | } |
|
180 | 183 | }, |
|
184 | "shadow": { | |
|
185 | "clone_url": "<clone_url>", | |
|
186 | }, | |
|
181 | 187 | "author": <user_obj>, |
|
182 | 188 | "reviewers": [ |
|
183 | 189 | ... |
@@ -110,6 +110,9 b' class SimpleVCS(object):' | |||
|
110 | 110 | This will populate the attributes acl_repo_name, url_repo_name, |
|
111 | 111 | vcs_repo_name and pr_id on the current instance. |
|
112 | 112 | """ |
|
113 | # TODO: martinb: Unify generation/suffix of clone url. It is currently | |
|
114 | # used here in the regex, in PullRequest in get_api_data() and | |
|
115 | # indirectly in routing configuration. | |
|
113 | 116 | # TODO: martinb: Move to class or module scope. |
|
114 | 117 | # TODO: martinb: Check if we have to use re.UNICODE. |
|
115 | 118 | # TODO: martinb: Check which chars are allowed for repo/group names. |
@@ -3109,11 +3109,12 b' class PullRequest(Base, _PullRequestBase' | |||
|
3109 | 3109 | from rhodecode.model.pull_request import PullRequestModel |
|
3110 | 3110 | pull_request = self |
|
3111 | 3111 | merge_status = PullRequestModel().merge_status(pull_request) |
|
3112 | pull_request_url = url( | |
|
3113 | 'pullrequest_show', repo_name=self.target_repo.repo_name, | |
|
3114 | pull_request_id=self.pull_request_id, qualified=True) | |
|
3112 | 3115 | data = { |
|
3113 | 3116 | 'pull_request_id': pull_request.pull_request_id, |
|
3114 | 'url': url('pullrequest_show', repo_name=self.target_repo.repo_name, | |
|
3115 | pull_request_id=self.pull_request_id, | |
|
3116 | qualified=True), | |
|
3117 | 'url': pull_request_url, | |
|
3117 | 3118 | 'title': pull_request.title, |
|
3118 | 3119 | 'description': pull_request.description, |
|
3119 | 3120 | 'status': pull_request.status, |
@@ -3143,6 +3144,10 b' class PullRequest(Base, _PullRequestBase' | |||
|
3143 | 3144 | 'commit_id': pull_request.target_ref_parts.commit_id, |
|
3144 | 3145 | }, |
|
3145 | 3146 | }, |
|
3147 | 'shadow': { | |
|
3148 | # TODO: martinb: Unify generation/suffix of clone url. | |
|
3149 | 'clone_url': '{}/repository'.format(pull_request_url), | |
|
3150 | }, | |
|
3146 | 3151 | 'author': pull_request.author.get_api_data(include_secrets=False, |
|
3147 | 3152 | details='basic'), |
|
3148 | 3153 | 'reviewers': [ |
General Comments 0
You need to be logged in to leave comments.
Login now