jorisvandenbossche commented on a change in pull request #11978:
URL: https://github.com/apache/arrow/pull/11978#discussion_r781096878
##########
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:
Added a comment.
(I don't think a regex is needed, since the match itself is already done
with a regex, which should ensure that it ends with this date. Of course in
theory the date could change format, but if we use ISO date, it will always be
like this)
--
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]