PR readiness: base ref and labels come from the bind snapshot instead of the live PR
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- github-actions, typescript
- Domaine
- ci-cd, developer-experience
Piste de recherche
Commence par scripts/pr-readiness.mjs et lis run(), où la PR est chargée et où la référence de base et les labels sont sélectionnés. Cherche ensuite les tests existants pour run() et ajoute un cas avec fetchFn simulé couvrant une base d’instantané dev par rapport à la base en direct main, ainsi qu’un label en direct skip-changelog. Le travail est terminé lorsque la comparaison utilise main et que le label affecte la vérification des changesets ; exécute le test correspondant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 3.4k
- Forks
- 516
- Merge moyen
- 1 j 15 h
- PR mergées (30 j)
- 116
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/squad
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
In-app coordinator/Ralph never reads .squad/ralph-instructions.md; only `squad watch --execute` doesOuvertewave:2-soon
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de github/squad
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
vercel-labs/ui#809 ·
Les mainteneurs répondent en général sous 1 jour
-
bot:ai-assisted component:platform-js status:untriaged
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ranxianglei/billion-context#7068 ·
Les mainteneurs répondent en général sous 1 jour
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
mybigday/whisper.rn#348 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
six-group/six-webcomponents#600 ·