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/09/27 17:11:09 UTC
[GitHub] [arrow] assignUser commented on a diff in pull request #14248: ARROW-17856: [CI][Archery] Add new Archery command to delete old branches and tags on crossbow repo
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
)
+
+
+@crossbow.command()
+@click.option('--dry-run/--execute', default=False,
+ help='Just display process, don\'t download anything')
+@click.option('--days', default=90,
+ help='Branches older than this amount of days will be deleted')
+@click.pass_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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org