Skip to content

Commit

Permalink
Merge pull request #2148 from YunoHost/actions/black
Browse files Browse the repository at this point in the history
Format Python code with Black
  • Loading branch information
alexAubin authored Mar 19, 2024
2 parents aa94784 + 3df35a0 commit 59a5857
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/readme_generator/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
def github_webhook_secret() -> str:
return Path("github_webhook_secret").resolve().open(encoding="utf-8").read().strip()


@cache
def github_login() -> str:
return Path("login").resolve().open(encoding="utf-8").read().strip()


@cache
def github_token() -> str:
return Path("token").resolve().open(encoding="utf-8").read().strip()
Expand Down Expand Up @@ -67,7 +69,7 @@ async def on_push(request: Request) -> HTTPResponse:
f"https://{github_login()}:{github_token()}@github.com/{repository}",
to_path=folder,
single_branch=True,
branch=branch
branch=branch,
)

generate_READMEs(folder)
Expand All @@ -80,8 +82,7 @@ async def on_push(request: Request) -> HTTPResponse:
return response.text("nothing to do")

repo.index.commit(
"Auto-update READMEs",
author=Actor("yunohost-bot", "[email protected]")
"Auto-update READMEs", author=Actor("yunohost-bot", "[email protected]")
)
repo.remote().push(quiet=False)

Expand Down

0 comments on commit 59a5857

Please sign in to comment.