[Bug] Claims bot ignores a command that isn't on the first line of a comment

Aperta Adatta ai principianti
#1,765 9 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@prx-my ci sta già lavorando.

Dal 23/11/2026.

  • #1773 di @prx-my — aperta

Valutazione

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

Direzione di ricerca

Il bug si trova in parseCommand in scripts/issue-claims.mjs, che legge solo la prima riga non vuota di un commento. Inizia da lì e verifica come la condizione if: del workflow inoltra questi commenti. È completato quando un comando su una riga separata più in basso nel commento viene eseguito, mentre i comandi all'interno di blocchi di codice, commenti HTML, citazioni o a metà frase vengono ignorati.

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

Descrizione

bug ci

Summary

The issue-claims bot only reads a command from the first non-empty line of a comment. If someone writes a note first and puts the command on a later line, the bot ignores the command. The workflow run still succeeds, so nothing shows that the command was skipped.

Where it happened

On #1590, the claimer commented:

Releasing the claim!

/unassign-me

Issue-claims run 44936964684 succeeded but did nothing, and they are still assigned to #1590.

issue-1590-unassign-ignored

Expected behavior

A line that holds only /assign-me, /unassign-me, /assign @user or /unassign @user runs the command, wherever it is in the comment.

Actual behavior

The command is ignored unless it is the first non-empty line. People have to be told to repost it on a line of its own at the top.

Cause

parseCommand in scripts/issue-claims.mjs only checks the first non-empty line. The workflow's if: already lets these comments through, so only the parser needs to change.

Proposed fix

Read the first line in the comment that holds only a command (same patterns as now). Skip lines inside code fences, HTML comments and quotes, so a pasted example never runs. A command mid-sentence still doesn't count. Part of the claiming workflow in #1669.

Lingua principale
TypeScript
Stelle
806
Fork
209
Merge medio
3g 16h
PR unite (30g)
133

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 OWASP/cve-lite-cli

Tutte le issue di OWASP/cve-lite-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.