PR readiness: base ref and labels come from the bind snapshot instead of the live PR
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, typescript
- Área
- ci-cd, developer-experience
Línea de trabajo
Empieza con scripts/pr-readiness.mjs y lee run(), donde carga el PR y selecciona la referencia base y las etiquetas. Luego busca las pruebas existentes para run() y añade un caso con fetchFn simulado que cubra una base de instantánea dev frente a la base en vivo main, además de una etiqueta en vivo skip-changelog. Se considera terminado cuando la comparación usa main y la etiqueta afecta a la comprobación de changesets; ejecuta la prueba pertinente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found by: github-integration-dev while fixing a Copilot review finding on #2423 (the #2420 fix). This is outside that PR's scope, so it's tracked here.
Problem
scripts/pr-readiness.mjs run() takes the PR's base ref and labels from environment variables. The bind job sets them from the event snapshot:
PR_BASE_REF(line ~471) is used for the "Branch up to date" comparison (compare/<base>...<head>), the checklist text and the links in the comment footer.PR_LABELS(line ~476) feeds "Changeset present", which honours theskip-changeloglabel.
run() already reads the live PR (GET /pulls/{n}), and that response contains base.ref and labels. Neither is used.
Once #2423 lands, runs for the same PR head share one concurrency group with cancel-in-progress: true. A late delivery from before a base change (an edited event) can therefore cancel the newer run for that head and post a checklist against the old base. A label change has the same effect when it is followed by a refresh for the same head. Stale-head deliveries are not affected: #2423 makes them write nothing.
Suggested fix
In run():
- Prefer
prData.base.refandprData.labels[].namefrom the live PR read. Fall back to the environment values only when that read fails, the same way draft status already prefers API truth (prData?.draft ?? prDraft). - Add a regression test with a mocked
fetchFn: a snapshot base ofdevand a live base ofmainmust compare againstmain, and a liveskip-changeloglabel must count when the snapshot lacks it.
Notes
- The request workflow does not trigger on
labeled/unlabeled, so a label change alone doesn't refresh the checklist. This issue is only about using live values when a refresh does run. - Low impact: the checklist is advisory, and the next PR event corrects it.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.4k
- Forks
- 516
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 116
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/squad
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
In-app coordinator/Ralph never reads .squad/ralph-instructions.md; only `squad watch --execute` doesAbiertowave:2-soon
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de github/squad
Issues similares
-
bot:ai-assisted component:platform-js status:untriaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
midnightntwrk/platform-js#38 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ranxianglei/billion-context#7068 ·
Los mantenedores suelen responder en 1 día
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ilan-pinto/roaring-lions#1552 ·
Los mantenedores suelen responder en 1 día