From c5fe6a788fb9fd6e7c6141c9cac05dfa947d6f0c Mon Sep 17 00:00:00 2001 From: Ryan Gribble Date: Tue, 5 Jun 2018 09:48:44 -0700 Subject: [PATCH] add node_id to Deployments payloads (Deployment and DeploymentStatus and Account/User/Organization) --- Octokit/Models/Response/Account.cs | 8 +++++++- Octokit/Models/Response/Deployment.cs | 8 +++++++- Octokit/Models/Response/DeploymentStatus.cs | 8 +++++++- Octokit/Models/Response/Organization.cs | 4 ++-- Octokit/Models/Response/User.cs | 4 ++-- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Octokit/Models/Response/Account.cs b/Octokit/Models/Response/Account.cs index 9538411933..9e242b9e9e 100644 --- a/Octokit/Models/Response/Account.cs +++ b/Octokit/Models/Response/Account.cs @@ -9,7 +9,7 @@ public abstract class Account { protected Account() { } - protected Account(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, AccountType type, string url) + protected Account(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, string nodeId, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, AccountType type, string url) { AvatarUrl = avatarUrl; Bio = bio; @@ -28,6 +28,7 @@ protected Account(string avatarUrl, string bio, string blog, int collaborators, Location = location; Login = login; Name = name; + NodeId = nodeId; OwnedPrivateRepos = ownedPrivateRepos; Plan = plan; PrivateGists = privateGists; @@ -103,6 +104,11 @@ protected Account(string avatarUrl, string bio, string blog, int collaborators, /// public int Id { get; protected set; } + /// + /// GraphQL Node Id + /// + public string NodeId { get; protected set; } + /// /// The account's geographic location. /// diff --git a/Octokit/Models/Response/Deployment.cs b/Octokit/Models/Response/Deployment.cs index a9ab8fe2cd..4d4e5be667 100644 --- a/Octokit/Models/Response/Deployment.cs +++ b/Octokit/Models/Response/Deployment.cs @@ -13,9 +13,10 @@ public class Deployment { public Deployment() { } - public Deployment(int id, string sha, string url, User creator, IReadOnlyDictionary payload, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description, string statusesUrl, bool transientEnvironment, bool productionEnvironment) + public Deployment(int id, string nodeId, string sha, string url, User creator, IReadOnlyDictionary payload, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description, string statusesUrl, bool transientEnvironment, bool productionEnvironment) { Id = id; + NodeId = nodeId; Sha = sha; Url = url; Creator = creator; @@ -33,6 +34,11 @@ public Deployment(int id, string sha, string url, User creator, IReadOnlyDiction /// public int Id { get; protected set; } + /// + /// GraphQL Node Id + /// + public string NodeId { get; protected set; } + /// /// /// diff --git a/Octokit/Models/Response/DeploymentStatus.cs b/Octokit/Models/Response/DeploymentStatus.cs index 363144da5f..a7bef3ca05 100644 --- a/Octokit/Models/Response/DeploymentStatus.cs +++ b/Octokit/Models/Response/DeploymentStatus.cs @@ -11,9 +11,10 @@ public class DeploymentStatus { public DeploymentStatus() { } - public DeploymentStatus(int id, string url, DeploymentState state, User creator, IReadOnlyDictionary payload, string targetUrl, string logUrl, string environmentUrl, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description) + public DeploymentStatus(int id, string nodeId, string url, DeploymentState state, User creator, IReadOnlyDictionary payload, string targetUrl, string logUrl, string environmentUrl, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description) { Id = id; + NodeId = nodeId; Url = url; State = state; Creator = creator; @@ -31,6 +32,11 @@ public DeploymentStatus(int id, string url, DeploymentState state, User creator, /// public int Id { get; protected set; } + /// + /// GraphQL Node Id + /// + public string NodeId { get; protected set; } + /// /// The API URL for this deployment status. /// diff --git a/Octokit/Models/Response/Organization.cs b/Octokit/Models/Response/Organization.cs index 9a1eea5620..9a0ad5dc25 100644 --- a/Octokit/Models/Response/Organization.cs +++ b/Octokit/Models/Response/Organization.cs @@ -10,8 +10,8 @@ public class Organization : Account { public Organization() { } - public Organization(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, string billingAddress) - : base(avatarUrl, bio, blog, collaborators, company, createdAt, diskUsage, email, followers, following, hireable, htmlUrl, totalPrivateRepos, id, location, login, name, ownedPrivateRepos, plan, privateGists, publicGists, publicRepos, AccountType.Organization, url) + public Organization(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string nodeId, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, string billingAddress) + : base(avatarUrl, bio, blog, collaborators, company, createdAt, diskUsage, email, followers, following, hireable, htmlUrl, totalPrivateRepos, id, location, login, name, nodeId, ownedPrivateRepos, plan, privateGists, publicGists, publicRepos, AccountType.Organization, url) { BillingAddress = billingAddress; } diff --git a/Octokit/Models/Response/User.cs b/Octokit/Models/Response/User.cs index 3fcf93ec61..96a2c611a1 100644 --- a/Octokit/Models/Response/User.cs +++ b/Octokit/Models/Response/User.cs @@ -14,8 +14,8 @@ public class User : Account { public User() { } - public User(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, DateTimeOffset updatedAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, RepositoryPermissions permissions, bool siteAdmin, string ldapDistinguishedName, DateTimeOffset? suspendedAt) - : base(avatarUrl, bio, blog, collaborators, company, createdAt, diskUsage, email, followers, following, hireable, htmlUrl, totalPrivateRepos, id, location, login, name, ownedPrivateRepos, plan, privateGists, publicGists, publicRepos, AccountType.User, url) + public User(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, DateTimeOffset updatedAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, string nodeId, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, RepositoryPermissions permissions, bool siteAdmin, string ldapDistinguishedName, DateTimeOffset? suspendedAt) + : base(avatarUrl, bio, blog, collaborators, company, createdAt, diskUsage, email, followers, following, hireable, htmlUrl, totalPrivateRepos, id, location, login, name, nodeId, ownedPrivateRepos, plan, privateGists, publicGists, publicRepos, AccountType.User, url) { Permissions = permissions; SiteAdmin = siteAdmin;