Skip to content

Commit

Permalink
Add missing Bearer token identification
Browse files Browse the repository at this point in the history
  • Loading branch information
petrberan committed Oct 10, 2024
1 parent 936baa2 commit daed1e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/jboss/set/GitBuildInfoAssembler.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private BuildInfo constructGithubBuild(String[] splitUrl, URL tagUrl) {
JsonNode refsJson;

try {
refsJson = githubRestClient.getRefsInfo(codeSpace, repository, version, githubKey);
refsJson = githubRestClient.getRefsInfo(codeSpace, repository, version, "Bearer " + githubKey);
} catch (ClientWebApplicationException e) {
logger.errorf("Failed to retrieve refs info for %s in constructGithubBuild", tagUrl.toString());
throw new GitRestClientException("Failed to retrieve refs info from Github: " + e.getMessage(), e, e.getResponse());
Expand All @@ -91,7 +91,7 @@ private BuildInfo constructGithubBuild(String[] splitUrl, URL tagUrl) {
if (refsType.equals(TAG)) {
JsonNode tagJson;
try {
tagJson = githubRestClient.getTagInfo(codeSpace, repository, commitSHA, githubKey);
tagJson = githubRestClient.getTagInfo(codeSpace, repository, commitSHA, "Bearer " + githubKey);
} catch (ClientWebApplicationException e) {
logger.errorf("Failed to retrieve tag info for %s in constructGithubBuild", tagUrl.toString());
throw new GitRestClientException("Failed to retrieve tag info from Github: " + e.getMessage(), e, e.getResponse());
Expand Down

0 comments on commit daed1e3

Please sign in to comment.