fix(sop-checklist): move target_url assignment before N/A status post
Some checks failed
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Blocked by required conditions
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Blocked by required conditions
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
audit-force-merge / audit (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Failing after 13s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 27s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 24s
CI / Detect changes (pull_request) Successful in 1m6s
sop-tier-check / tier-check (pull_request) Successful in 26s
security-review / approved (pull_request) Failing after 44s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m10s
qa-review / approved (pull_request) Failing after 45s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m12s
gate-check-v3 / gate-check (pull_request) Successful in 59s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m22s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m32s
CI / all-required (pull_request) Successful in 3m45s
CI / Python Lint & Test (pull_request) Successful in 7m32s
CI / Canvas (Next.js) (pull_request) Successful in 18m38s
CI / Platform (Go) (pull_request) Successful in 19m33s
sop-checklist / all-items-acked (pull_request) acked: 7/7

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 <noreply@anthropic.com>
This commit is contained in:
Molecule AI · core-devops 2026-05-15 16:19:49 +00:00
parent 69a75f0db0
commit 71f90bba74

View File

@ -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: