From 71f90bba74d205df25e8c58c0331498e79164987 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Fri, 15 May 2026 16:19:49 +0000 Subject: [PATCH] fix(sop-checklist): move target_url assignment before N/A status post NameError: target_url referenced at line ~992 before assignment at line ~999. Fix moves the assignment before the N/A gate status post so it is available for both status POST calls. Co-Authored-By: Claude Opus 4.7 --- .gitea/scripts/sop-checklist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/scripts/sop-checklist.py b/.gitea/scripts/sop-checklist.py index c6eb0f05..7edc7307 100644 --- a/.gitea/scripts/sop-checklist.py +++ b/.gitea/scripts/sop-checklist.py @@ -984,6 +984,8 @@ def main(argv: list[str] | None = None) -> int: status_flag = "valid" if entry["valid"] else f"invalid: {entry['error']}" print(f"::notice:: {g}: declared by {entry['declared_by']} — {status_flag}") + target_url = f"https://{args.gitea_host}/{args.owner}/{args.repo}/pulls/{args.pr}" + if not args.dry_run: na_context = "sop-checklist / na-declarations (pull_request)" client.post_status( @@ -996,8 +998,6 @@ def main(argv: list[str] | None = None) -> int: print(f"::notice::posting status: state={state} desc={description!r}") - target_url = f"https://{args.gitea_host}/{args.owner}/{args.repo}/pulls/{args.pr}" - if args.dry_run: print("::notice::--dry-run: not posting status") if args.exit_on_state: