3 Commits

Author SHA1 Message Date
2d1facfb41 fix(ci): call scripts/pr_lgtm_scanner.py instead of inline python
All checks were successful
CI / Detect Changes (pull_request) Successful in 3s
PR → Build → devicectl Deploy → LGTM / Detect Changes (pull_request) Successful in 4s
CI / Deploy (pull_request) Has been skipped
PR → Build → devicectl Deploy → LGTM / Build & Deploy to iPhone (devicectl) (pull_request) Successful in 4m39s
CI / YouTube Worker (pull_request) Has been skipped
PR → Build → devicectl Deploy → LGTM / Wait for LGTM comment (pull_request) Successful in 11m52s
The inline python3 -c body in wait-approval raised IndentationError: unexpected indent because YAML block scalars dedent content to the first line's indent, leaving the python body with leading whitespace.

Replace with a call to scripts/pr_lgtm_scanner.py (added in the previous commit). Add a shallow Checkout step to wait-approval so the script is present on the runner.

This is the third indentation fix attempt for this scanner:
  - column-0 python  → YAML parse failure
  - indented python  → Python IndentationError
  - standalone file  → no indentation concerns (this commit)
2026-07-20 09:34:29 +02:00
7196cce237 add scripts/pr_lgtm_scanner.py — LGTM/KO scanner for pr-iphone-deploy
Standalone Python scanner extracted from the inline python in wait-approval. Embedding multi-line Python in a YAML run: | block scalar is fragile: YAML dedents block-scalar content to the first line's indent, which produced both YAML parse failures and Python IndentationErrors in earlier iterations of this workflow. A standalone script file sidesteps all of that and is testable locally.

Behavior preserved:
  - json.loads + \bLGTM\b / \bKO\b word-boundary regex (case-insensitive)
  - skip bot comments tagged with <!-- tabatago:ready-to-test -->
  - KO checked BEFORE LGTM (PR with both signals blocks)

Verified locally across 8 scenarios (bot-only, LGTM, KO, both, empty, usage error, KOM/LGTMX non-match, case-insensitive).
2026-07-20 09:34:28 +02:00
47106ff281 fix(ci): indent python3 -c body so YAML block scalar parses
Some checks failed
CI / Deploy (pull_request) Has been skipped
PR → Build → devicectl Deploy → LGTM / Build & Deploy to iPhone (devicectl) (pull_request) Successful in 2m39s
PR → Build → devicectl Deploy → LGTM / Wait for LGTM comment (pull_request) Failing after 31s
PR → Build → devicectl Deploy → LGTM / Detect Changes (pull_request) Successful in 3s
CI / Detect Changes (pull_request) Successful in 4s
CI / YouTube Worker (pull_request) Has been skipped
The python3 inline script in wait-approval was written at column 0 (lines 257-283), but YAML block scalars require content to be more indented than the parent key. YAML exited the run: | block at the first column-0 line ("import json, re, sys") and tried to parse the python as YAML, failing with "could not find expected :" at line 257 — which prevented pr-iphone-deploy.yml from running at all (no run was ever created for PRs that touched only the workflow file).

Fix: switch to python3 -c with the body indented to sit inside the run: | block scalar.

Verified locally:
  - yaml.safe_load parses the workflow cleanly (jobs: changes, build-deploy, wait-approval).
  - The extracted python, run exactly as act will execute it, returns:
      bot-only            -> PENDING  (was self-merging before)
      bot + reviewer LGTM -> LGTM     (squash-merge still fires)
      bot + reviewer KO   -> KO       (block still fires)
2026-07-20 09:21:28 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "my-app",
"version": "1.0.3",
"version": "1.0.2",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,3 +1,3 @@
{
"version": "1.0.3"
"version": "1.0.2"
}