forked from adamm/git-importer
Create with sha256 enabled
This commit is contained in:
parent
574bc9aa10
commit
2a3475ab6e
@ -253,7 +253,7 @@ class Git:
|
|||||||
url = f"https://src.opensuse.org/api/v1/org/{org_name}/repos"
|
url = f"https://src.opensuse.org/api/v1/org/{org_name}/repos"
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
url,
|
url,
|
||||||
data={"name": repo_name},
|
data={"name": repo_name, "object_format_name": "sha256"},
|
||||||
headers={"Authorization": f"token {os.getenv('GITEA_TOKEN')}"},
|
headers={"Authorization": f"token {os.getenv('GITEA_TOKEN')}"},
|
||||||
timeout=10,
|
timeout=10,
|
||||||
)
|
)
|
||||||
|
14
update-tasks.sh
Executable file
14
update-tasks.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user