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/01/09 22:18:36 UTC

[GitHub] [arrow] edponce commented on a change in pull request #11978: ARROW-15137: [Dev] Update archery crossbow latest-prefix to work with nightly dates

edponce commented on a change in pull request #11978:
URL: https://github.com/apache/arrow/pull/11978#discussion_r780838857



##########
File path: dev/archery/archery/crossbow/core.py
##########
@@ -536,17 +536,34 @@ def _latest_prefix_id(self, prefix):
             latest = -1
         return latest
 
+    def _latest_prefix_date(self, prefix):
+        pattern = re.compile(r'[\w\/-]*{}-(\d+)-(\d+)-(\d+)'.format(prefix))
+        matches = list(filter(None, map(pattern.match, self.repo.branches)))
+        if matches:
+            latest = sorted([m.group(0) for m in matches])[-1][-10:]

Review comment:
       I am not sure what the `[-10:]` pertains to, so maybe add a comment. Or could this be extracted using regex for more generality?




-- 
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