From c9ddf3edc3627a0738ec41a93666e48b04f8c0f4 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:39:17 +0000 Subject: [PATCH] fix: Fix namespaces for Artifacts models (#2862) --- Octokit/Models/Response/Artifact.cs | 153 +++++++++--------- .../Models/Response/ArtifactWorkflowRun.cs | 83 +++++----- .../Models/Response/ListArtifactsResponse.cs | 45 +++--- 3 files changed, 145 insertions(+), 136 deletions(-) diff --git a/Octokit/Models/Response/Artifact.cs b/Octokit/Models/Response/Artifact.cs index 1f6be53771..32628cde9b 100644 --- a/Octokit/Models/Response/Artifact.cs +++ b/Octokit/Models/Response/Artifact.cs @@ -2,82 +2,85 @@ using System.Diagnostics; using System.Globalization; -[DebuggerDisplay("{DebuggerDisplay,nq}")] -public class Artifact +namespace Octokit { - public Artifact() + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class Artifact { + public Artifact() + { + } + + public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun) + { + Id = id; + NodeId = nodeId; + Name = name; + SizeInBytes = sizeInBytes; + Url = url; + ArchiveDownloadUrl = archiveDownloadUrl; + Expired = expired; + CreatedAt = createdAt; + ExpiresAt = expiresAt; + UpdatedAt = updatedAt; + WorkflowRun = workflowRun; + } + + /// + /// The artifact Id + /// + public long Id { get; private set; } + + /// + /// The artifact node Id + /// + public string NodeId { get; private set; } + + /// + /// The name of the artifact + /// + public string Name { get; private set; } + + /// + /// The size of the artifact in bytes + /// + public int SizeInBytes { get; private set; } + + /// + /// The url for retrieving the artifact information + /// + public string Url { get; private set; } + + /// + /// The url for downloading the artifact contents + /// + public string ArchiveDownloadUrl { get; private set; } + + /// + /// True if the artifact has expired + /// + public bool Expired { get; private set; } + + /// + /// The date and time when the artifact was created + /// + public DateTime CreatedAt { get; private set; } + + /// + /// The date and time when the artifact expires + /// + public DateTime ExpiresAt { get; private set; } + + /// + /// The date and time when the artifact was last updated + /// + public DateTime UpdatedAt { get; private set; } + + /// + /// The workflow from where the artifact was created + /// + public ArtifactWorkflowRun WorkflowRun { get; private set; } + + internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id); } - - public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun) - { - Id = id; - NodeId = nodeId; - Name = name; - SizeInBytes = sizeInBytes; - Url = url; - ArchiveDownloadUrl = archiveDownloadUrl; - Expired = expired; - CreatedAt = createdAt; - ExpiresAt = expiresAt; - UpdatedAt = updatedAt; - WorkflowRun = workflowRun; - } - - /// - /// The artifact Id - /// - public long Id { get; private set; } - - /// - /// The artifact node Id - /// - public string NodeId { get; private set; } - - /// - /// The name of the artifact - /// - public string Name { get; private set; } - - /// - /// The size of the artifact in bytes - /// - public int SizeInBytes { get; private set; } - - /// - /// The url for retrieving the artifact information - /// - public string Url { get; private set; } - - /// - /// The url for downloading the artifact contents - /// - public string ArchiveDownloadUrl { get; private set; } - - /// - /// True if the artifact has expired - /// - public bool Expired { get; private set; } - - /// - /// The date and time when the artifact was created - /// - public DateTime CreatedAt { get; private set; } - - /// - /// The date and time when the artifact expires - /// - public DateTime ExpiresAt { get; private set; } - - /// - /// The date and time when the artifact was last updated - /// - public DateTime UpdatedAt { get; private set; } - - /// - /// The workflow from where the artifact was created - /// - public ArtifactWorkflowRun WorkflowRun { get; private set; } - - internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id); } \ No newline at end of file diff --git a/Octokit/Models/Response/ArtifactWorkflowRun.cs b/Octokit/Models/Response/ArtifactWorkflowRun.cs index a39a1b6a34..86f1c94173 100644 --- a/Octokit/Models/Response/ArtifactWorkflowRun.cs +++ b/Octokit/Models/Response/ArtifactWorkflowRun.cs @@ -1,46 +1,49 @@ using System.Diagnostics; using System.Globalization; -[DebuggerDisplay("{DebuggerDisplay,nq}")] -public class ArtifactWorkflowRun +namespace Octokit { - public ArtifactWorkflowRun() + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class ArtifactWorkflowRun { - } - - public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha) - { - Id = id; - RepositoryId = repositoryId; - HeadRepositoryId = headRepositoryId; - HeadBranch = headBranch; - HeadSha = headSha; - } + public ArtifactWorkflowRun() + { + } + + public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha) + { + Id = id; + RepositoryId = repositoryId; + HeadRepositoryId = headRepositoryId; + HeadBranch = headBranch; + HeadSha = headSha; + } + + /// + /// The workflow run Id + /// + public long Id { get; private set; } - /// - /// The workflow run Id - /// - public long Id { get; private set; } - - /// - /// The repository Id - /// - public long RepositoryId { get; private set; } - - /// - /// The head repository Id - /// - public long HeadRepositoryId { get; private set; } - - /// - /// The head branch - /// - public string HeadBranch { get; private set; } - - /// - /// The head Sha - /// - public string HeadSha { get; private set; } - - internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id); -} + /// + /// The repository Id + /// + public long RepositoryId { get; private set; } + + /// + /// The head repository Id + /// + public long HeadRepositoryId { get; private set; } + + /// + /// The head branch + /// + public string HeadBranch { get; private set; } + + /// + /// The head Sha + /// + public string HeadSha { get; private set; } + + internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id); + } +} \ No newline at end of file diff --git a/Octokit/Models/Response/ListArtifactsResponse.cs b/Octokit/Models/Response/ListArtifactsResponse.cs index 0d6a9db2be..e85c25a919 100644 --- a/Octokit/Models/Response/ListArtifactsResponse.cs +++ b/Octokit/Models/Response/ListArtifactsResponse.cs @@ -2,28 +2,31 @@ using System.Diagnostics; using System.Globalization; -[DebuggerDisplay("{DebuggerDisplay,nq}")] -public class ListArtifactsResponse +namespace Octokit { - public ListArtifactsResponse() + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class ListArtifactsResponse { - } - - public ListArtifactsResponse(int totalCount, IReadOnlyList artifacts) - { - TotalCount = totalCount; - Artifacts = artifacts; - } + public ListArtifactsResponse() + { + } + + public ListArtifactsResponse(int totalCount, IReadOnlyList artifacts) + { + TotalCount = totalCount; + Artifacts = artifacts; + } - /// - /// The number of artifacts found - /// - public int TotalCount { get; private set; } - - /// - /// The list of found artifacts - /// - public IReadOnlyList Artifacts { get; private set; } = new List(); - - internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount); + /// + /// The number of artifacts found + /// + public int TotalCount { get; private set; } + + /// + /// The list of found artifacts + /// + public IReadOnlyList Artifacts { get; private set; } = new List(); + + internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount); + } } \ No newline at end of file