From 5955def4b896e401ee5e03da0884c077f6c5a273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 26 Jan 2022 17:40:41 +0100 Subject: [PATCH] Accept branch parameter in webui --- src/runboat/webui.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runboat/webui.py b/src/runboat/webui.py index a334806..80dcd54 100644 --- a/src/runboat/webui.py +++ b/src/runboat/webui.py @@ -57,10 +57,16 @@ def mount(app: FastAPI) -> None: @router.get("/builds", response_class=RedirectResponse) -async def builds(repo: str, target_branch: str | None = None) -> Response: +async def builds( + repo: str, + target_branch: str | None = None, + branch: str | None = None, +) -> Response: url = f"/webui/builds.html?repo={repo}" if target_branch: url += f"&target_branch={target_branch}" + if branch: + url += f"&branch={branch}" return RedirectResponse(url=url)