DEVX-162: fix: read Gitea repo-variable data field; fail closed on unknown nightly status
Post-merge / detect-and-configure (push) Successful in 2m9s
Post-merge / release-and-maintain (push) Successful in 1m30s

This commit was merged in pull request #319.
This commit is contained in:
2026-09-17 09:41:36 +00:00
parent 87d46226f6
commit 27ea8903eb
7 changed files with 1949 additions and 2874 deletions
+4 -1
View File
@@ -392,7 +392,10 @@ class GiteaClient:
"""
try:
r = self._request("GET", f"/actions/variables/{name}")
return r.json().get("value")
body = r.json()
if "data" in body:
return body["data"]
return body.get("value")
except APIError as e:
if e.status == 404:
return None
+9 -2
View File
@@ -97,10 +97,17 @@ def cli(repo: str, action: str, run_id: str, github_output: bool) -> None:
write_github_output("nightly-status", status)
raise click.ClickException(_("Nightly gate failed — staging deploy blocked."))
else:
click.echo(f"[nightly-gate] Unknown nightly status: {status} — allowing deploy.")
click.echo(
_(
"[nightly-gate] Unknown nightly status: {status} — blocking deploy (fail closed).",
status=status,
),
err=True,
)
if github_output:
write_github_output("nightly-gate-passed", "true")
write_github_output("nightly-gate-passed", "false")
write_github_output("nightly-status", status)
raise click.ClickException(_("Unknown nightly status — staging deploy blocked."))
elif action == "set-passed":
set_nightly_status(client, f"passed:{run_id}" if run_id else "passed")
+1836 -2846
View File
File diff suppressed because it is too large Load Diff