-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #570 from gsmet/github-api-1.319
Update to Quarkus GitHub API 1.319.0 and support @DiscussionComment
- Loading branch information
Showing
5 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
events/src/main/java/io/quarkiverse/githubapp/event/DiscussionComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package io.quarkiverse.githubapp.event; | ||
|
||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import jakarta.inject.Qualifier; | ||
|
||
import org.kohsuke.github.GHEventPayload; | ||
|
||
/** | ||
* https://docs.github.com/en/webhooks/webhook-events-and-payloads#discussion_comment | ||
*/ | ||
@Event(name = "discussion_comment", payload = GHEventPayload.DiscussionComment.class) | ||
@Target({ PARAMETER, TYPE }) | ||
@Retention(RUNTIME) | ||
@Qualifier | ||
public @interface DiscussionComment { | ||
|
||
String value() default Actions.ALL; | ||
|
||
@DiscussionComment(Created.NAME) | ||
@Target(PARAMETER) | ||
@Retention(RUNTIME) | ||
@Qualifier | ||
public @interface Created { | ||
|
||
String NAME = Actions.CREATED; | ||
} | ||
|
||
@DiscussionComment(Deleted.NAME) | ||
@Target(PARAMETER) | ||
@Retention(RUNTIME) | ||
@Qualifier | ||
public @interface Deleted { | ||
|
||
String NAME = Actions.DELETED; | ||
} | ||
|
||
@DiscussionComment(Edited.NAME) | ||
@Target(PARAMETER) | ||
@Retention(RUNTIME) | ||
@Qualifier | ||
public @interface Edited { | ||
|
||
String NAME = Actions.EDITED; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters