[Fix] Fixes an issue where the runner application response deserialization would fail

This commit is contained in:
Matisse Hack
2023-05-09 07:43:43 -07:00
committed by GitHub
parent e032611e54
commit 9adcf16362
5 changed files with 42 additions and 19 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ namespace Octokit
Id = id;
}
public Runner(long id, string name, string os, string status, bool busy, List<Label> labels)
public Runner(long id, string name, string os, string status, bool busy, List<RunnerLabel> labels)
{
Id = id;
Name = name;
@@ -30,7 +30,7 @@ namespace Octokit
public string Os { get; private set; }
public string Status { get; private set; }
public bool Busy { get; private set; }
public IReadOnlyList<Label> Labels { get; private set; }
public IReadOnlyList<RunnerLabel> Labels { get; private set; }
internal string DebuggerDisplay
{
+7 -5
View File
@@ -8,25 +8,27 @@ namespace Octokit
{
public RunnerApplication() { }
public RunnerApplication(string os, string architecture, string downloadUrl, string fileName)
public RunnerApplication(string os, string architecture, string downloadUrl, string filename, string tempDownloadToken)
{
Os = os;
Architecture = architecture;
DownloadUrl = downloadUrl;
FileName = fileName;
Filename = filename;
TempDownloadToken = tempDownloadToken;
}
public string Os { get; private set; }
public string Architecture { get; private set; }
public string DownloadUrl { get; private set; }
public string FileName { get; private set; }
public string Filename { get; private set; }
public string TempDownloadToken { get; private set; }
internal string DebuggerDisplay
{
get
{
return string.Format("Os: {0}; Architecture: {1}; DownloadUrl: {2}; FileName: {3};",
Os, Architecture, DownloadUrl, FileName);
return string.Format("Os: {0}; Architecture: {1}; DownloadUrl: {2}; Filename: {3}; TempDownloadToken: {4}",
Os, Architecture, DownloadUrl, Filename, TempDownloadToken);
}
}
}
+27
View File
@@ -0,0 +1,27 @@
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class RunnerLabel
{
public RunnerLabel() { }
public RunnerLabel(long id, string name, string type)
{
Id = id;
Name = name;
Type = type;
}
public long Id { get; private set; }
public string Name { get; private set; }
public string Type { get; private set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Id: {0}; Name: {1}; Type: {2};", Id, Name, Type); }
}
}
}