Do not reopen closed issues on new incoming email replies, add status/new-reply label instead

Aperta Adatta ai principianti
#90 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
tooling

Direzione di ricerca

Inizia aprendo MailProcessor.java per individuare la logica che gestisce le risposte e-mail in arrivo per le issue chiuse. Modifica quella logica in modo che non riapra l’issue e non aggiunga l’etichetta status/re-opened-by-bot, ma aggiunga invece l’etichetta status/triage, continuando comunque ad aggiungere il commento. Aggiorna i test unitari pertinenti per verificare che le issue chiuse rimangano chiuse e ricevano solo la nuova etichetta di triage; poi rimuovi la costante inutilizzata Labels.REOPENED_BY_BOT se non ha altri riferimenti.

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

Descrizione

Summary

Following the discussion with @stianst, when new email replies arrive for an existing security issue (regardless of whether it is open or closed, in triage, waiting for a CVE, or closed/rejected), the bot should no longer reopen the issue or add the status/re-opened-by-bot label.

Instead, it should add the status/new-reply label. This label applies to both open and closed issues, but is only added when there is a new reply on an existing thread—never when a new issue is initially created.

When we respond to the email using commands like @security reply (or other respond/reject commands) or manually remove the label, the status/new-reply label should be removed.

Tracking of these issues will be managed via the GitHub Project (Keycloak Security Queue), configured with views filtered by label to identify issues with new replies needing follow-up, rather than relying on repository-level reopen state.


Proposed Changes
  1. Email Processing (MailProcessor.java):

    • When an email arrives for an existing issue (which can be either open or closed):
      • Do not call issue.reopen().
      • Do not add status/re-opened-by-bot (Labels.REOPENED_BY_BOT).
      • Add the status/new-reply label to indicate the reporter has sent a new reply.
      • Note: This label is only added on subsequent replies to existing issues, and never on initial issue creation (where we already know it requires response via source/email / status/triage).
      • Append the comment as usual.
  2. Command Processing:

    • When responding using @security reply (or respond/reject commands), the bot should automatically remove the status/new-reply label.
    • If a response is not needed, the label can be removed manually.
  3. GitHub Project View:

    • Use Keycloak Project #69 to track issues marked with status/new-reply that require attention and response.
  4. Cleanup:

    • Remove or deprecate unused Labels.REOPENED_BY_BOT constant and related label handling if no longer needed elsewhere.

Acceptance Criteria
  • Closed issues remain closed when new email comments are appended via MailProcessor.
  • status/new-reply label is attached to both open and closed issues when a new email reply arrives.
  • status/new-reply is not added to newly created issues upon initial creation.
  • status/re-opened-by-bot label is no longer added.
  • status/new-reply label is automatically removed when responding via @security reply (or equivalent commands).
  • Unit tests updated to verify closed state is preserved, initial creation does not get the label, and new-reply behavior on existing issues is correct.
Lingua principale
Java
Stelle
10
Fork
11
Merge medio
9g 15h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 keycloak/keycloak-github-bot

Tutte le issue di keycloak/keycloak-github-bot

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.