assignUser commented on code in PR #14248:
URL: https://github.com/apache/arrow/pull/14248#discussion_r981509238


##########
dev/archery/archery/crossbow/cli.py:
##########
@@ -551,3 +551,42 @@ def upload_artifacts(obj, tag, sha, patterns, method):
     queue.github_overwrite_release_assets(
         tag_name=tag, target_commitish=sha, method=method, patterns=patterns
     )
+
+
[email protected]()
[email protected]('--dry-run/--execute', default=False,
+              help='Just display process, don\'t download anything')
[email protected]('--days', default=90,
+              help='Branches older than this amount of days will be deleted')
[email protected]_obj
+def delete_old_branches(obj, dry_run, days):
+    """
+    Deletes branches on queue repository (crossbow) that are older than number
+    of days.

Review Comment:
   I would add a caveat here that deleting to many branches at once can trigger 
githubs hacking/fraud protection, though I do not know what the threshold is 
for that.



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

Reply via email to