From 597d3c1d91a932546313730f2c4fbd79b75b37ad Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 20 May 2019 13:10:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(GiteeController):=20=E6=94=AF=E6=8C=81Bran?= =?UTF-8?q?chName=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Controllers/Api/GiteeController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bootstrap.Admin/Controllers/Api/GiteeController.cs b/Bootstrap.Admin/Controllers/Api/GiteeController.cs index f1b027dd..65678864 100644 --- a/Bootstrap.Admin/Controllers/Api/GiteeController.cs +++ b/Bootstrap.Admin/Controllers/Api/GiteeController.cs @@ -77,13 +77,14 @@ namespace Bootstrap.Admin.Controllers.Api /// /// /// + /// /// /// /// - public async Task Builds([FromServices]IHttpClientFactory httpClientFactory, [FromQuery]string userName = "ArgoZhang", [FromQuery]string projName = "bootstrapadmin", [FromQuery]string label = "custom badge", [FromQuery]string color = "orange") + public async Task Builds([FromServices]IHttpClientFactory httpClientFactory, [FromQuery]string userName = "ArgoZhang", [FromQuery]string projName = "bootstrapadmin", [FromQuery]string branchName = "master", [FromQuery]string label = "custom badge", [FromQuery]string color = "orange") { var client = httpClientFactory.CreateClient(); - var content = await client.GetAsJsonAsync($"https://ci.appveyor.com/api/projects/{userName}/{projName}"); + var content = await client.GetAsJsonAsync($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}"); return new JsonResult(new { schemaVersion = 1, label, message = content.Build.Version, color }); }