trigger: detect default branch from repo instead of hardcoding master
Some checks failed
CI / Lint & Check (push) Failing after 26s

This commit is contained in:
Username
2026-03-14 11:44:42 +01:00
parent ced702fb01
commit 051a5de121

View File

@@ -27,7 +27,10 @@ def cmd_trigger(api: GiteaAPI, args: argparse.Namespace) -> int:
return 1
workflow = args.workflow
ref = args.ref or "master"
ref = args.ref
if not ref:
repo_info = api.get_repo(owner, repo)
ref = (repo_info or {}).get("default_branch", "main")
# Parse inputs if provided
inputs = {}