1
0
Fork 0

fix(readme-generator/regen_readme_in_batch): generate_READMEs expect a Path object now

This commit is contained in:
Laurent Peuch 2024-03-29 06:50:47 +01:00
parent 66b0d20b79
commit df18ddc242

View file

@ -6,6 +6,7 @@ import asyncio
import tempfile import tempfile
from make_readme import generate_READMEs from make_readme import generate_READMEs
from pathlib import Path
github_webhook_secret = open("github_webhook_secret", "r").read().strip() github_webhook_secret = open("github_webhook_secret", "r").read().strip()
@ -40,7 +41,7 @@ async def regen_readme(repository, branch):
with tempfile.TemporaryDirectory() as folder: with tempfile.TemporaryDirectory() as folder:
await git(["clone", f"https://{login}:{token}@github.com/{repository}", "--single-branch", "--branch", branch, folder]) await git(["clone", f"https://{login}:{token}@github.com/{repository}", "--single-branch", "--branch", branch, folder])
generate_READMEs(folder) generate_READMEs(Path(folder))
await git(["add", "README*.md"], in_folder=folder) await git(["add", "README*.md"], in_folder=folder)
await git(["add", "ALL_README.md"], in_folder=folder) await git(["add", "ALL_README.md"], in_folder=folder)