Skip to content

Commit c9ddf3e

Browse files
authored
fix: Fix namespaces for Artifacts models (#2862)
1 parent edd080b commit c9ddf3e

File tree

3 files changed

+145
-136
lines changed

3 files changed

+145
-136
lines changed

Octokit/Models/Response/Artifact.cs

+78-75
Original file line numberDiff line numberDiff line change
@@ -2,82 +2,85 @@
22
using System.Diagnostics;
33
using System.Globalization;
44

5-
[DebuggerDisplay("{DebuggerDisplay,nq}")]
6-
public class Artifact
5+
namespace Octokit
76
{
8-
public Artifact()
7+
[DebuggerDisplay("{DebuggerDisplay,nq}")]
8+
public class Artifact
99
{
10+
public Artifact()
11+
{
12+
}
13+
14+
public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun)
15+
{
16+
Id = id;
17+
NodeId = nodeId;
18+
Name = name;
19+
SizeInBytes = sizeInBytes;
20+
Url = url;
21+
ArchiveDownloadUrl = archiveDownloadUrl;
22+
Expired = expired;
23+
CreatedAt = createdAt;
24+
ExpiresAt = expiresAt;
25+
UpdatedAt = updatedAt;
26+
WorkflowRun = workflowRun;
27+
}
28+
29+
/// <summary>
30+
/// The artifact Id
31+
/// </summary>
32+
public long Id { get; private set; }
33+
34+
/// <summary>
35+
/// The artifact node Id
36+
/// </summary>
37+
public string NodeId { get; private set; }
38+
39+
/// <summary>
40+
/// The name of the artifact
41+
/// </summary>
42+
public string Name { get; private set; }
43+
44+
/// <summary>
45+
/// The size of the artifact in bytes
46+
/// </summary>
47+
public int SizeInBytes { get; private set; }
48+
49+
/// <summary>
50+
/// The url for retrieving the artifact information
51+
/// </summary>
52+
public string Url { get; private set; }
53+
54+
/// <summary>
55+
/// The url for downloading the artifact contents
56+
/// </summary>
57+
public string ArchiveDownloadUrl { get; private set; }
58+
59+
/// <summary>
60+
/// True if the artifact has expired
61+
/// </summary>
62+
public bool Expired { get; private set; }
63+
64+
/// <summary>
65+
/// The date and time when the artifact was created
66+
/// </summary>
67+
public DateTime CreatedAt { get; private set; }
68+
69+
/// <summary>
70+
/// The date and time when the artifact expires
71+
/// </summary>
72+
public DateTime ExpiresAt { get; private set; }
73+
74+
/// <summary>
75+
/// The date and time when the artifact was last updated
76+
/// </summary>
77+
public DateTime UpdatedAt { get; private set; }
78+
79+
/// <summary>
80+
/// The workflow from where the artifact was created
81+
/// </summary>
82+
public ArtifactWorkflowRun WorkflowRun { get; private set; }
83+
84+
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
1085
}
11-
12-
public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun)
13-
{
14-
Id = id;
15-
NodeId = nodeId;
16-
Name = name;
17-
SizeInBytes = sizeInBytes;
18-
Url = url;
19-
ArchiveDownloadUrl = archiveDownloadUrl;
20-
Expired = expired;
21-
CreatedAt = createdAt;
22-
ExpiresAt = expiresAt;
23-
UpdatedAt = updatedAt;
24-
WorkflowRun = workflowRun;
25-
}
26-
27-
/// <summary>
28-
/// The artifact Id
29-
/// </summary>
30-
public long Id { get; private set; }
31-
32-
/// <summary>
33-
/// The artifact node Id
34-
/// </summary>
35-
public string NodeId { get; private set; }
36-
37-
/// <summary>
38-
/// The name of the artifact
39-
/// </summary>
40-
public string Name { get; private set; }
41-
42-
/// <summary>
43-
/// The size of the artifact in bytes
44-
/// </summary>
45-
public int SizeInBytes { get; private set; }
46-
47-
/// <summary>
48-
/// The url for retrieving the artifact information
49-
/// </summary>
50-
public string Url { get; private set; }
51-
52-
/// <summary>
53-
/// The url for downloading the artifact contents
54-
/// </summary>
55-
public string ArchiveDownloadUrl { get; private set; }
56-
57-
/// <summary>
58-
/// True if the artifact has expired
59-
/// </summary>
60-
public bool Expired { get; private set; }
61-
62-
/// <summary>
63-
/// The date and time when the artifact was created
64-
/// </summary>
65-
public DateTime CreatedAt { get; private set; }
66-
67-
/// <summary>
68-
/// The date and time when the artifact expires
69-
/// </summary>
70-
public DateTime ExpiresAt { get; private set; }
71-
72-
/// <summary>
73-
/// The date and time when the artifact was last updated
74-
/// </summary>
75-
public DateTime UpdatedAt { get; private set; }
76-
77-
/// <summary>
78-
/// The workflow from where the artifact was created
79-
/// </summary>
80-
public ArtifactWorkflowRun WorkflowRun { get; private set; }
81-
82-
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
8386
}
+43-40
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
11
using System.Diagnostics;
22
using System.Globalization;
33

4-
[DebuggerDisplay("{DebuggerDisplay,nq}")]
5-
public class ArtifactWorkflowRun
4+
namespace Octokit
65
{
7-
public ArtifactWorkflowRun()
6+
[DebuggerDisplay("{DebuggerDisplay,nq}")]
7+
public class ArtifactWorkflowRun
88
{
9-
}
10-
11-
public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha)
12-
{
13-
Id = id;
14-
RepositoryId = repositoryId;
15-
HeadRepositoryId = headRepositoryId;
16-
HeadBranch = headBranch;
17-
HeadSha = headSha;
18-
}
9+
public ArtifactWorkflowRun()
10+
{
11+
}
12+
13+
public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha)
14+
{
15+
Id = id;
16+
RepositoryId = repositoryId;
17+
HeadRepositoryId = headRepositoryId;
18+
HeadBranch = headBranch;
19+
HeadSha = headSha;
20+
}
21+
22+
/// <summary>
23+
/// The workflow run Id
24+
/// </summary>
25+
public long Id { get; private set; }
1926

20-
/// <summary>
21-
/// The workflow run Id
22-
/// </summary>
23-
public long Id { get; private set; }
24-
25-
/// <summary>
26-
/// The repository Id
27-
/// </summary>
28-
public long RepositoryId { get; private set; }
29-
30-
/// <summary>
31-
/// The head repository Id
32-
/// </summary>
33-
public long HeadRepositoryId { get; private set; }
34-
35-
/// <summary>
36-
/// The head branch
37-
/// </summary>
38-
public string HeadBranch { get; private set; }
39-
40-
/// <summary>
41-
/// The head Sha
42-
/// </summary>
43-
public string HeadSha { get; private set; }
44-
45-
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
46-
}
27+
/// <summary>
28+
/// The repository Id
29+
/// </summary>
30+
public long RepositoryId { get; private set; }
31+
32+
/// <summary>
33+
/// The head repository Id
34+
/// </summary>
35+
public long HeadRepositoryId { get; private set; }
36+
37+
/// <summary>
38+
/// The head branch
39+
/// </summary>
40+
public string HeadBranch { get; private set; }
41+
42+
/// <summary>
43+
/// The head Sha
44+
/// </summary>
45+
public string HeadSha { get; private set; }
46+
47+
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
48+
}
49+
}

Octokit/Models/Response/ListArtifactsResponse.cs

+24-21
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@
22
using System.Diagnostics;
33
using System.Globalization;
44

5-
[DebuggerDisplay("{DebuggerDisplay,nq}")]
6-
public class ListArtifactsResponse
5+
namespace Octokit
76
{
8-
public ListArtifactsResponse()
7+
[DebuggerDisplay("{DebuggerDisplay,nq}")]
8+
public class ListArtifactsResponse
99
{
10-
}
11-
12-
public ListArtifactsResponse(int totalCount, IReadOnlyList<Artifact> artifacts)
13-
{
14-
TotalCount = totalCount;
15-
Artifacts = artifacts;
16-
}
10+
public ListArtifactsResponse()
11+
{
12+
}
13+
14+
public ListArtifactsResponse(int totalCount, IReadOnlyList<Artifact> artifacts)
15+
{
16+
TotalCount = totalCount;
17+
Artifacts = artifacts;
18+
}
1719

18-
/// <summary>
19-
/// The number of artifacts found
20-
/// </summary>
21-
public int TotalCount { get; private set; }
22-
23-
/// <summary>
24-
/// The list of found artifacts
25-
/// </summary>
26-
public IReadOnlyList<Artifact> Artifacts { get; private set; } = new List<Artifact>();
27-
28-
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount);
20+
/// <summary>
21+
/// The number of artifacts found
22+
/// </summary>
23+
public int TotalCount { get; private set; }
24+
25+
/// <summary>
26+
/// The list of found artifacts
27+
/// </summary>
28+
public IReadOnlyList<Artifact> Artifacts { get; private set; } = new List<Artifact>();
29+
30+
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount);
31+
}
2932
}

0 commit comments

Comments
 (0)