ER: Blank PRs get commented on for formatting issues too

Aperta Adatta ai principianti
#8,871 1 commento 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
67/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript
Ambito
ci-cd, tooling

Direzione di ricerca

Leggi ~/github-actions/trigger-pr/check-linked-issue.js, in particolare la riga 105, dove l’issue segnala un errore quando pr.body è vuoto. Inizia esaminando come l’action gestisce i corpi delle pull request e consulta il rapporto sull’errore collegato in PR #8815; usa le guide fornite per testare GitHub Actions e provarla in un ambiente personale. Il lavoro è completato quando l’action gestisce un corpo PR vuoto e lascia il commento previsto.

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

Descrizione

Complexity: Small ER Feature: Refactor GHA Issue Making: Level 2 ready for merge team role: back end/devOps size: 0.25pt
Emergent Requirement - Problem

We should make sure that check-linked-issue.js can handle blank PRs as well. That code currently helps to check PRs for proper formatting to make sure an issue is linked, but it fails if the PR it is checking is blank.

Issue you discovered this emergent requirement in
  • #8815
Date discovered

10-24-2026

Did you have to do something temporarily
  • YES
  • NO
Who was involved

@castillios
@daras-cu

What happens if this is not addressed

If a blank PR get published, the PR to check for a a properly linked issue does not leave any comment on the PR to notify the author of an issue.

Resources
Recommended Action Items
  • Make a new issue
  • Discuss with team
  • Let a Team Lead know
Potential solutions [draft]

Issue:

  • Complexity: Small (While the suggested change here only requires changing one line of code, I gave it the Complexity: Small label because it requires testing GitHub Actions.)
  • Relationships: None
  • Size: 0.25pt
  • Fix:
    in ~/github-actions/trigger-pr/check-linked-issue.js (line 105), change:
const match = pr.body.match(regex); 

... to:

const match = (pr.body ?? '').match(regex);
Lingua principale
JavaScript
Stelle
365
Fork
872
Merge medio
8g 19h
PR unite (30g)
2

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 hackforla/website

Tutte le issue di hackforla/website

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.