pitrou commented on code in PR #12882:
URL: https://github.com/apache/arrow/pull/12882#discussion_r850459231
##########
dev/archery/archery/crossbow/reports.py:
##########
@@ -173,10 +173,15 @@ def url(self, query):
repo_url = self.job.queue.remote_url.strip('.git')
return '{}/branches/all?query={}'.format(repo_url, query)
+ def branch_url(self, branch):
+ repo_url = self.job.queue.remote_url.strip('.git')
Review Comment:
This isn't correct:
```python
>>> "something".strip(".git")
'somethin'
```
Starting with Python 3.9 you can use
[`str.removesuffix`](https://docs.python.org/3/library/stdtypes.html#str.removesuffix),
but for now you'll need something like:
```python
@property
def repo_url(self):
url = self.job.queue.remote_url
return url[:-4] if url.endswith('.git') else url
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]