Skip to content

Commit 2ff962a

Browse files
committed
Re-add "triage" label when re-opening an issue via email
Co-authored-by: Stian Thorgersen <stianst@gmail.com> Closes #72 Signed-off-by: Bruno Oliveira da Silva <bruno@abstractj.com>
1 parent 40b9396 commit 2ff962a

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/org/keycloak/gh/bot/security/email/MailProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ private void processSingleMessage(Message msgSummary, GitHub github, GHRepositor
139139
var issue = issueOpt.get();
140140
if (issue.getState() == GHIssueState.CLOSED) {
141141
issue.reopen();
142+
issue.addLabels(Labels.STATUS_TRIAGE, Labels.REOPENED_BY_BOT);
142143
LOGGER.infof("Reopened existing closed issue #%d for thread %s", issue.getNumber(), threadId);
143144
}
144145
appendComment(issue, from, body, attachmentSection);

src/main/java/org/keycloak/gh/bot/utils/Labels.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class Labels {
2222

2323
public static final String SOURCE_EMAIL = "source/email";
2424

25+
public static final String REOPENED_BY_BOT = "status/re-opened-by-bot";
26+
2527
public static boolean hasLabel(GHIssue issue, String label) {
2628
return issue.getLabels().stream().filter(l -> l.getName().equals(label)).findFirst().isPresent();
2729
}

0 commit comments

Comments
 (0)