fix(#I10GY5): 修复 Gitee/Issue 接口

#Comment
comment #I10GY5

#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I10GY5
This commit is contained in:
Argo Zhang 2019-08-10 20:27:19 +08:00
parent 46cb309218
commit d8c3a5193d
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ namespace Bootstrap.Admin.Controllers.Api
var ret = await GetJsonAsync(() => client.GetStringAsync($"https://gitee.com/{userName}/{repoName}/issues"), content =>
{
var regex = Regex.Matches(content, "<div class='ui mini circular label'>([\\d]+)</div>", RegexOptions.IgnoreCase);
var labels = new string[] { "open", "closed", "rejected" };
var labels = new string[] { "open", "progressing", "closed", "rejected" };
var result = string.IsNullOrEmpty(content) ? new string[] { "unknown" } : regex.Select((m, i) => $"{labels[i]} {m.Groups[1].Value}");
return string.Join(" ", result);
});