Skip to content

Commit

Permalink
Use HttpClientGitHubConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Aug 13, 2024
1 parent 1509014 commit 404c0a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/net/neoforged/automation/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.neoforged.automation.webhook.impl.GitHubEvent;
import net.neoforged.automation.webhook.impl.WebhookHandler;
import org.kohsuke.github.GitHubBuilder;
import org.kohsuke.github.extras.HttpClientGitHubConnector;

import java.io.IOException;
import java.nio.file.Path;
Expand All @@ -30,6 +31,7 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept
AuthUtil.parsePKCS8(startupConfig.get("gitHubAppKey", "")),
ghApp -> ghApp.getInstallationByOrganization(startupConfig.get("gitHubAppOrganization", ""))
))
.withConnector(new HttpClientGitHubConnector())
.build();

var location = Configuration.load(gitHub, startupConfig);
Expand All @@ -53,6 +55,7 @@ public static WebhookHandler setupWebhookHandlers(StartupConfiguration startupCo
AuthUtil.parsePKCS8(startupConfig.get("releasesGitHubAppKey", "")),
ghApp -> ghApp.getInstallationByOrganization(startupConfig.get("releasesGitHubAppOrganization", ""))
))
.withConnector(new HttpClientGitHubConnector())
.build()))
.registerFilteredHandler(GitHubEvent.ISSUES, new LabelLockHandler(), GHAction.LABELED, GHAction.UNLABELED)
.registerFilteredHandler(GitHubEvent.WORKFLOW_RUN, new PRActionRunnerHandler(), GHAction.COMPLETED)
Expand Down

0 comments on commit 404c0a6

Please sign in to comment.