mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 17:28:57 +00:00
Add a cutoff period before archiving
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import datetime
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
@@ -90,8 +91,12 @@ def main() -> None:
|
||||
refname = eols[count]
|
||||
try:
|
||||
repo = g.get_repo(f"flathub/{refname}")
|
||||
if not repo.archived:
|
||||
print("Archiving {}".format(repo.html_url))
|
||||
if not repo.archived and repo.pushed_at < earliest:
|
||||
print(
|
||||
"Archiving: {}. Repo is in EOL list. Last push: {}, earlier than: {}".format(
|
||||
repo.html_url, repo.pushed_at.isoformat(), earliest.isoformat()
|
||||
)
|
||||
)
|
||||
repo.edit(archived=True)
|
||||
except UnknownObjectException:
|
||||
pass
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Archive EOL repositories
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 14 * * 1'
|
||||
- cron: '0 0 1 * *'
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
|
||||
Reference in New Issue
Block a user