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

Open Beginner friendly
#90 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
tooling

Research direction

Start by opening MailProcessor.java to locate the logic that handles incoming email replies for closed issues. Modify that logic to skip reopening the issue and adding the status/re-opened-by-bot label, and instead add the status/triage label while still appending the comment. Update the relevant unit tests to verify closed issues remain closed and only receive the new triage label, then remove the unused Labels.REOPENED_BY_BOT constant if it has no other references.

Written by the indexing model from the issue text.

Description

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.
Dominant language
Java
Stars
10
Forks
11
Avg merge
9d 15h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from keycloak/keycloak-github-bot

All issues in keycloak/keycloak-github-bot

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.