Skip to content

Commit

Permalink
Change in the accept header for vulnerability alerts (#990)
Browse files Browse the repository at this point in the history
The code seems to be raising false GH issues so I checked the updated github api doc - https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#check-if-vulnerability-alerts-are-enabled-for-a-repository
  • Loading branch information
ajinkyapatil8190 authored Dec 12, 2023
1 parent 7b129ae commit 7b172f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private Value<Boolean> enabledVulnerabilityAlerts(GitHubProject project) {
String url = String.format("https://api.github.com/repos/%s/%s/vulnerability-alerts",
project.organization().name(), project.name());
HttpGet request = new HttpGet(url);
request.addHeader(HttpHeaders.ACCEPT, "application/vnd.github.dorian-preview+json");
request.addHeader(HttpHeaders.ACCEPT, "application/vnd.github+json");
request.addHeader(HttpHeaders.AUTHORIZATION, String.format("Bearer %s", fetcher.token()));
try (CloseableHttpResponse response = client.execute(request)) {
return ENABLED_VULNERABILITY_ALERTS_ON_GITHUB
Expand Down

0 comments on commit 7b172f4

Please sign in to comment.