From a2eee04e72bfd73cc5e783e7e18b3c7363ceaa87 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 19 Feb 2022 12:13:27 +0100 Subject: [PATCH] Fixed URL format in Gitea probing. --- src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java b/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java index c934b0f..e97994b 100644 --- a/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java +++ b/src/fr/devinsy/statoolinfos/metrics/gitea/GiteaAPI.java @@ -56,15 +56,15 @@ public class GiteaAPI this.token = token; // - String json = IOUtils.toString(new URL(url + "/api/v1/admin/users?limit=100000&token=" + token), Charset.defaultCharset()); + String json = IOUtils.toString(new URL(this.url + "/api/v1/admin/users?limit=100000&token=" + token), Charset.defaultCharset()); this.users = (JSONArray) (new JSONParser().parse(json)); // - json = IOUtils.toString(new URL(url + "/api/v1/admin/orgs?limit=100000&token=" + token), Charset.defaultCharset()); + json = IOUtils.toString(new URL(this.url + "/api/v1/admin/orgs?limit=100000&token=" + token), Charset.defaultCharset()); this.organizations = (JSONArray) (new JSONParser().parse(json)); // - json = IOUtils.toString(new URL(url + "/api/v1/repos/search?limit=100000&token=" + token), Charset.defaultCharset()); + json = IOUtils.toString(new URL(this.url + "/api/v1/repos/search?limit=100000&token=" + token), Charset.defaultCharset()); this.repositories = (JSONArray) ((JSONObject) (new JSONParser().parse(json))).get("data"); }