From 2a3475ab6e526123077e8f0392635e9805d9549f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Fri, 17 May 2024 20:39:55 +0200 Subject: [PATCH] Create with sha256 enabled --- lib/git.py | 2 +- update-tasks.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 update-tasks.sh diff --git a/lib/git.py b/lib/git.py index 635924c..b0d99a8 100644 --- a/lib/git.py +++ b/lib/git.py @@ -253,7 +253,7 @@ class Git: url = f"https://src.opensuse.org/api/v1/org/{org_name}/repos" response = requests.post( url, - data={"name": repo_name}, + data={"name": repo_name, "object_format_name": "sha256"}, headers={"Authorization": f"token {os.getenv('GITEA_TOKEN')}"}, timeout=10, ) diff --git a/update-tasks.sh b/update-tasks.sh new file mode 100755 index 0000000..cef1001 --- /dev/null +++ b/update-tasks.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +cd /space/dmueller/git-importer + +source credentials.sh + +while true; do + for i in $PWD/tasks/*; do + echo "$(date): Importing $(basename $i)" + python3 ./git-importer.py -c repos/.cache $(basename $i) + rm -f $i; + done + inotifywait -q -e create $PWD/tasks +done