@@ -14,12 +14,10 @@ WARNING: Make sure you use the `📋` button to copy the command.
1414----
1515quarkus create app \
1616 -x quarkus-github-app \ <1>
17- org.acme:my-github-app \ <2>
18- --no-code <3>
17+ org.acme:my-github-app <2>
1918----
2019<1> The Quarkus GitHub App extension.
2120<2> The GA of your Maven project.
22- <3> Do not include unrelated generated code in the project.
2321
2422[TIP]
2523====
@@ -40,13 +38,11 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \
4038 -DplatformVersion={quarkus-version} \
4139 -DprojectGroupId=org.acme \ <1>
4240 -DprojectArtifactId=my-github-app \ <2>
43- -Dextensions="io.quarkiverse.githubapp:quarkus-github-app:{quarkus-github-app-version}" \ <3>
44- -DnoCode <4>
41+ -Dextensions="io.quarkiverse.githubapp:quarkus-github-app:{quarkus-github-app-version}" <3>
4542----
4643<1> The groupId of your Maven project.
4744<2> The artifactId of your Maven project.
4845<3> The Quarkus GitHub App extension.
49- <4> Do not include unrelated generated code in the project.
5046
5147[TIP]
5248====
@@ -118,15 +114,23 @@ Check the instructions above carefully.
118114That's it! You are done with the setup and you can code your GitHub App.
119115Sky is the limit.
120116
121- For instance, you can create the following class :
117+ Your newly created GitHub App comes with a small example :
122118
123119[source, java]
124120----
125- class CreateComment {
121+ package org.acme;
126122
127- void onOpen(@Issue.Opened GHEventPayload.Issue issuePayload) throws IOException {
128- issuePayload.getIssue().comment("Hello from my GitHub App");
129- }
123+ import java.io.IOException;
124+
125+ import org.kohsuke.github.GHEventPayload;
126+
127+ import io.quarkiverse.githubapp.event.Issue;
128+
129+ class MyGitHubApp {
130+
131+ void onOpen(@Issue.Opened GHEventPayload.Issue issuePayload) throws IOException {
132+ issuePayload.getIssue().comment(":wave: Hello from my GitHub App");
133+ }
130134}
131135----
132136
@@ -143,7 +147,7 @@ In details:
143147
144148You are done developing your first Quarkus GitHub App.
145149
146- Obviously the one we developed is not very useful, but it is a good start and by using this framework:
150+ Obviously, the code from `MyGitHubApp` is not very useful in real life , but it is a good start and by using this framework:
147151
148152* You can listen to all the events currently supported by the https://github.com/hub4j/github-api[Hub4j GitHub API].
149153* You have the full power of Quarkus with live coding, easy configuration, dependency injection, native executables and more.
0 commit comments