Fix conflicts

This commit is contained in:
Luke Tomlinson
2023-03-21 11:29:42 -04:00
parent 97d28f7803
commit 534bcec44b
3 changed files with 2 additions and 12 deletions

View File

@@ -165,8 +165,7 @@ namespace GitHub.Runner.Common
var body = new StringContent(StringUtil.ConvertToJson(bodyObject), null, "application/json");
var response = await RetryRequest(githubApiUrl, githubToken, RequestType.Post, 3, "Failed to add agent", body);
var runner = StringUtil.ConvertFromJson<GitHub.DistributedTask.WebApi.Runner>(response);
var runner = await RetryRequest<DistributedTask.WebApi.Runner>(githubApiUrl, githubToken, RequestType.Post, 3, "Failed to add agent", body);
agent.Id = runner.Id;
agent.Authorization = new TaskAgentAuthorization()
{

View File

@@ -34,13 +34,6 @@ namespace GitHub.DistributedTask.WebApi
set;
}
public List<TaskAgent> ToTaskAgents()
{
List<TaskAgent> taskAgents = new List<TaskAgent>();
return Runners.Select(runner => new TaskAgent() { Name = runner.Name }).ToList();
}
public ListRunnersResponse Clone()
{
return new ListRunnersResponse(this);
@@ -48,8 +41,6 @@ namespace GitHub.DistributedTask.WebApi
public List<TaskAgent> ToTaskAgents()
{
List<TaskAgent> taskAgents = new List<TaskAgent>();
return Runners.Select(runner => new TaskAgent() { Name = runner.Name }).ToList();
}
}

View File

@@ -1,5 +1,5 @@
using System;
using Newtonsoft.Json;
using System.Security.AccessControl;
namespace GitHub.DistributedTask.WebApi
{