Run lane script entry points through one lib helper (part 2 of 2)

Aperta Adatta ai principianti
#15,454 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript, node.js
Ambito
tooling

Direzione di ricerca

Leggi i sette file elencati in .github/scripts/pr-unblock/ e confronta le rispettive parti finali di ingresso con .github/scripts/lib/run-main.mjs, creato dalla parte 1. Sostituisci ciascuna parte finale con la chiamata specificata a runAsScript(metaUrl, label, run), mantenendo la relativa etichetta e il comportamento di main(process.env). Esegui il controllo di sincronizzazione indicato e le suite di test pertinenti; il lavoro è completato quando tutti e sette gli script usano l’helper e mantengono lo stesso comportamento di output e di uscita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Agent Brief

Type: Task
Summary: Run the remaining seven lane scripts' entry points through .github/scripts/lib/run-main.mjs in place of their copied entry tail (part 2 of 2, part of restructuring pass #14159).

Current behavior:
Seven .github/scripts/pr-unblock/ scripts still end with their own copy of the 11-line entry tail (if (process.argv[1] && import.meta.url === pathToFileURL(...)), main(...), then ::error::<label> failed):

  • main(process.env): gate-recheck.mjs:83, lane-hold.mjs:98, publish-feedback.mjs:1052, resolve-threads.mjs:196, verify-notes.mjs:362.
  • A different label: dispatch.mjs:959, refine-event-dispatch.mjs:104.

Desired behavior:
Each of the seven calls runAsScript(metaUrl, label, run) from ../lib/run-main.mjs in place of its tail. Blocked by part 1, which creates lib/run-main.mjs and adds its floor row, so this item has no floor change.

Files:

  • .github/scripts/pr-unblock/gate-recheck.mjs
  • .github/scripts/pr-unblock/lane-hold.mjs
  • .github/scripts/pr-unblock/publish-feedback.mjs
  • .github/scripts/pr-unblock/resolve-threads.mjs
  • .github/scripts/pr-unblock/verify-notes.mjs
  • .github/scripts/pr-unblock/dispatch.mjs
  • .github/scripts/pr-unblock/refine-event-dispatch.mjs

Key interfaces:

  • Each script runs main only when executed directly, with the same arguments, and on failure prints the same ::error::<label> failed line, with its own label, and exits with the same code as now.
  • Importing any of these modules from a test still runs nothing.

Acceptance criteria:

  • None of the seven scripts keeps its own entry tail; each uses lib/run-main.mjs.
  • Behavior is unchanged: the same outputs, ::error:: lines and exit codes for the same inputs.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • python3 -I scripts/sync-hold-floor.py --check passes.
  • test_merge_holds_sync.py, test_babysit_risk.py, .github/actions/resolve-config/callers.test.mjs and the node suite of .github/scripts/pr-unblock/ pass.
  • ci-status is green.

Out of scope:

  • lib/run-main.mjs itself, other duplication, eval cases, fixtures, and skill and agent text.
Lingua principale
Shell
Stelle
22
Fork
2
Merge medio
1h 18m
PR unite (30g)
975

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di melodic-software/claude-code-plugins

Tutte le issue di melodic-software/claude-code-plugins

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.