File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
runtime/src/main/java/io/quarkiverse/githubapp Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ public interface GitHubCustomizer {
1010
1111 /**
1212 * Customize the {@link GitHubBuilder} with various options.
13+ *
14+ * <p>
15+ * These customizations are applied to both application and installation clients. Known cases of customizations that
16+ * may be used with installation clients but not with application clients include configuring a rate limit checker. To use a
17+ * different set of customizations for the application client, implement {@link #customizeApplicationClient(GitHubBuilder)}.
1318 * <p>
1419 * Note that customizations that use {@link GitHubBuilder#withAppInstallationToken(String)} and
1520 * {@link GitHubBuilder#withEndpoint(String)} are eventually overridden by the
@@ -21,4 +26,22 @@ public interface GitHubCustomizer {
2126 * @param builder to customize
2227 */
2328 void customize (GitHubBuilder builder );
29+
30+ /**
31+ * Customize the {@link GitHubBuilder} with various options specifically for the application client. Default implementation
32+ * delegates to {@link #customize(GitHubBuilder)} for backwards compatibility.
33+ * <p>
34+ * Note that customizations should never use {@link GitHubBuilder#withAppInstallationToken(String)}, because this is the
35+ * application client. Customizations that use {@link GitHubBuilder#withJwtToken(String)} and
36+ * {@link GitHubBuilder#withEndpoint(String)} are eventually overridden by the service.
37+ *
38+ * <p>
39+ * To specify a custom endpoint, use configuration properties {@code quarkus.github-app.instance-endpoint} or
40+ * {@code quarkus.github-app.rest-api-endpoint}.
41+ *
42+ * @param builder to customize
43+ */
44+ default void customizeApplicationClient (GitHubBuilder builder ) {
45+ customize (builder );
46+ }
2447}
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ private GitHub createApplicationGitHub() {
292292 final GitHubBuilder gitHubBuilder = new GitHubBuilder ()
293293 .withConnector (gitHubConnector );
294294 // apply customizations
295- githubCustomizer .customize (gitHubBuilder );
295+ githubCustomizer .customizeApplicationClient (gitHubBuilder );
296296 // configure mandatory defaults
297297 gitHubBuilder
298298 .withJwtToken (jwtToken )
You can’t perform that action at this time.
0 commit comments