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