Skip to content

Commit

Permalink
Add thumbs-up for normal/low priority
Browse files Browse the repository at this point in the history
Signed-off-by: stianst <[email protected]>
  • Loading branch information
stianst committed Feb 26, 2024
1 parent 1632278 commit b0f28ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
14 changes: 14 additions & 0 deletions src/main/java/org/keycloak/gh/bot/BugActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.kohsuke.github.GHMilestone;
import org.kohsuke.github.GHRepository;
import org.kohsuke.github.PagedIterator;
import org.kohsuke.github.ReactionContent;

import java.io.IOException;
import java.util.HashMap;
Expand Down Expand Up @@ -63,13 +64,15 @@ public class BugActions {
BugAction.create(Action.PRIORITY_NORMAL)
.priority(Priority.NORMAL)
.comment()
.thumbsUp()
.helpWanted()
.autoExpire()
.autoBump()
.removeMilestone(),
BugAction.create(Action.PRIORITY_LOW)
.priority(Priority.LOW)
.comment()
.thumbsUp()
.helpWanted()
.autoExpire()
.autoBump()
Expand Down Expand Up @@ -129,6 +132,10 @@ private void runAction(BugAction action, GHIssue issue) throws IOException {
labelsToAdd.add(Status.AUTO_BUMP.toLabel());
}

if (action.thumbsUp) {
issue.createReaction(ReactionContent.PLUS_ONE);
}

labelsToRemove.add(action.action.toLabel());

labelsToRemove.removeAll(labelsToAdd);
Expand Down Expand Up @@ -218,6 +225,8 @@ static final class BugAction {
boolean autoExpire = false;
boolean autoBump = false;

boolean thumbsUp = false;

public static BugAction create(Action action) {
return new BugAction(action);
}
Expand Down Expand Up @@ -276,6 +285,11 @@ BugAction autoBump() {
return this;
}

BugAction thumbsUp() {
this.thumbsUp = true;
return this;
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ action-QUESTION=\
action-MISSING_INFO=\
Thanks for reporting this issue, but there is insufficient information or lack of steps to reproduce.\n\
\n\
Please provide additional details, otherwise the issue will be automatically closed within 14 days.
Please provide additional details, otherwise this issue will be automatically closed within 14 days.

action-OLD_RELEASE=\
Thanks for reporting this issue, but as this is reported against an older and unsupported release we are not able \
to evaluate the issue. Please verify with the latest release and update the issue if the issue still exists.\n\
to evaluate the issue. Please verify with the [nightly build](https://github.com/keycloak/keycloak/releases/tag/nightly)\
or the [latest release](https://www.keycloak.org/downloads).\n\
\n\
Please provide additional details, otherwise the issue will be automatically closed within 14 days.
If the issue can be reproduced in the nightly build or latest release add a comment with additional information, \
otherwise this issue will be automatically closed within 14 days.

action-INVALID=\
Thanks for reporting this issue. However, after review this is not considered a valid issue, or has been recently resolved.\n\
Expand All @@ -22,13 +24,13 @@ action-INVALID=\
action-PRIORITY_NORMAL=\
Due to the amount of issues reported by the community we are not able to prioritise resolving this issue at the moment.\n\
\n\
If you are affected by this issue, upvote it by adding a :thumbsup: in the description. We would also welcome a \
If you are affected by this issue, upvote it by adding a :thumbsup: to the description. We would also welcome a \
contribution to fix the issue.

action-PRIORITY_LOW=\
Due to the amount of issues reported by the community we are not able to prioritise resolving this issue at the moment.\n\
\n\
If you are affected by this issue, upvote it by adding a :thumbsup: in the description. We would also welcome a \
If you are affected by this issue, upvote it by adding a :thumbsup: to the description. We would also welcome a \
contribution to fix the issue.

expired=\
Expand Down

0 comments on commit b0f28ef

Please sign in to comment.