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