Skip to content

Commit

Permalink
Fix typo in variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
timyates committed Aug 8, 2023
1 parent 7d18386 commit ebc0394
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/groovy/io/micronaut/build/MicronautDocsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ abstract class MicronautDocsPlugin implements Plugin<Project> {
outputIndex = layout.buildDir.file("working/05-dropdown/index.html")
versionsJson = githubApi.zip(slug) { api, ghSlug ->
try {
byte[] jsonArr = api.fetchTagsFromGitHub(ghslug)
byte[] jsonArr = api.fetchTagsFromGitHub(ghSlug)
return new String(jsonArr, "UTF-8")
} catch (Exception e) {
task.logger.error("Exception fetching github tags for $ghSlug")
task.logger.error("Exception fetching github tags for $ghSlug", e)
return "[]"
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/micronaut/build/utils/GithubApiUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 original authors
* Copyright 2017-2023 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,6 +44,7 @@ static byte[] fetchTagsFromGitHub(Logger logger, String slug) {

private static byte[] fetchFromGithub(Logger logger, String slug, String what) {
String url = System.getProperty(GITHUB_API_BASE_URL_SYSTEM_PROPERTY, GITHUB_BASE_API_URL) + "/repos/" + normalizeSlug(slug) + "/" + what;
logger.lifecycle("Fetching " + what + " from " + url);
try {
return fetchFromGithub(logger, connectionForGithubUrl(logger, url));
} catch (IOException ex) {
Expand Down

0 comments on commit ebc0394

Please sign in to comment.