diff --git a/src/main/java/org/keycloak/gh/bot/BugActions.java b/src/main/java/org/keycloak/gh/bot/BugActions.java index 594cce0..5d0296d 100644 --- a/src/main/java/org/keycloak/gh/bot/BugActions.java +++ b/src/main/java/org/keycloak/gh/bot/BugActions.java @@ -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; @@ -63,6 +64,7 @@ public class BugActions { BugAction.create(Action.PRIORITY_NORMAL) .priority(Priority.NORMAL) .comment() + .thumbsUp() .helpWanted() .autoExpire() .autoBump() @@ -70,6 +72,7 @@ public class BugActions { BugAction.create(Action.PRIORITY_LOW) .priority(Priority.LOW) .comment() + .thumbsUp() .helpWanted() .autoExpire() .autoBump() @@ -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); @@ -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); } @@ -276,6 +285,11 @@ BugAction autoBump() { return this; } + BugAction thumbsUp() { + this.thumbsUp = true; + return this; + } + } } \ No newline at end of file diff --git a/src/main/resources/org/keycloak/gh/bot/bug-action-messages.properties b/src/main/resources/org/keycloak/gh/bot/bug-action-messages.properties index 988feee..30e93cd 100644 --- a/src/main/resources/org/keycloak/gh/bot/bug-action-messages.properties +++ b/src/main/resources/org/keycloak/gh/bot/bug-action-messages.properties @@ -22,13 +22,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=\