You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/14 13:43:26 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #12882: MINOR: [CI] update to nightly reports individual job URLs

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org