PR readiness: base ref and labels come from the bind snapshot instead of the live PR
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- github-actions, typescript
- Domínio
- ci-cd, developer-experience
Direção de pesquisa
Comece por scripts/pr-readiness.mjs e leia run(), onde o PR é carregado e a referência base e os rótulos são selecionados. Em seguida, encontre os testes existentes para run() e adicione um caso com fetchFn simulado que cubra uma base de snapshot dev em comparação com a base ativa main, além de um rótulo ativo skip-changelog. O trabalho estará concluído quando a comparação usar main e o rótulo afetar a verificação do changeset; execute o teste relevante.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 3.4k
- Forks
- 516
- Merge médio
- 1d 15h
- PRs com merge (30d)
- 116
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/squad
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
In-app coordinator/Ralph never reads .squad/ralph-instructions.md; only `squad watch --execute` doesAbertawave:2-soon
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
Todas as issues de github/squad
Issues semelhantes
-
bot:ai-assisted component:platform-js status:untriaged
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 74/100
midnightntwrk/platform-js#38 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ranxianglei/billion-context#7068 ·
Mantenedores costumam responder em até 1 dia
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
ilan-pinto/roaring-lions#1552 ·
Mantenedores costumam responder em até 1 dia