From 18f176a66b49744a09d303542cf571d52be737e6 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 15 Nov 2021 14:23:45 +0800 Subject: [PATCH] refactor: check latest release from api.github.com instead --- src/Models/Version.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Version.cs b/src/Models/Version.cs index 1402b1c8..04ba541a 100644 --- a/src/Models/Version.cs +++ b/src/Models/Version.cs @@ -52,13 +52,13 @@ namespace SourceGit.Models { try { #if NET6_0_OR_GREATER var req = new HttpClient(); - var rsp = await req.GetAsync("https://gitee.com/api/v5/repos/sourcegit/sourcegit/releases/latest"); + var rsp = await req.GetAsync("https://api.github.com/repos/sourcegit-scm/sourcegit/releases/latest"); rsp.EnsureSuccessStatusCode(); var raw = await rsp.Content.ReadAsStringAsync(); #else var web = new WebClient() { Encoding = Encoding.UTF8 }; - var raw = await web.DownloadStringTaskAsync("https://gitee.com/api/v5/repos/sourcegit/sourcegit/releases/latest"); + var raw = await web.DownloadStringTaskAsync("https://api.github.com/repos/sourcegit-scm/sourcegit/releases/latest"); #endif var ver = JsonSerializer.Deserialize(raw); var cur = Assembly.GetExecutingAssembly().GetName().Version;