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

Đang mở Phù hợp với người mới
#90 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách mở MailProcessor.java để xác định logic xử lý các câu trả lời email đến cho các issue đã đóng. Sửa đổi logic đó để không mở lại issue và không thêm nhãn status/re-opened-by-bot, mà thay vào đó thêm nhãn status/triage đồng thời vẫn nối thêm bình luận. Cập nhật các bài kiểm thử đơn vị liên quan để xác minh rằng các issue đã đóng vẫn giữ trạng thái đóng và chỉ nhận nhãn triage mới, sau đó xóa hằng số không dùng Labels.REOPENED_BY_BOT nếu nó không có tham chiếu nào khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Java
Star
10
Fork
11
Merge trung bình
9 ngày 15 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của keycloak/keycloak-github-bot

Tất cả issue của keycloak/keycloak-github-bot

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.