From 6a03fbff00cb63f8ffda0398854f9e4c287cb889 Mon Sep 17 00:00:00 2001 From: Mike Ciechan Date: Tue, 25 Oct 2022 02:50:51 +0100 Subject: [PATCH 1/3] Adding AllowUpdateBranch --- Octokit/Models/Request/RepositoryUpdate.cs | 5 +++++ Octokit/Models/Response/Repository.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Octokit/Models/Request/RepositoryUpdate.cs b/Octokit/Models/Request/RepositoryUpdate.cs index 02dda177e3..9c10fd2e5e 100644 --- a/Octokit/Models/Request/RepositoryUpdate.cs +++ b/Octokit/Models/Request/RepositoryUpdate.cs @@ -114,6 +114,11 @@ public RepositoryUpdate() { } /// public bool? AllowForking { get; set; } + /// + /// Optional. Get or set whether to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. The default is null (do not update). The default when created is false. + /// + public bool? AllowUpdateBranch { get; set; } + internal string DebuggerDisplay => new SimpleJsonSerializer().Serialize(this); } } diff --git a/Octokit/Models/Response/Repository.cs b/Octokit/Models/Response/Repository.cs index ba7b2c697f..1f7bf759ae 100644 --- a/Octokit/Models/Response/Repository.cs +++ b/Octokit/Models/Response/Repository.cs @@ -158,6 +158,8 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st public RepositoryVisibility? Visibility { get; private set; } public bool? AllowAutoMerge { get; private set; } + + public bool? AllowUpdateBranch { get; private set; } internal string DebuggerDisplay { From aa817ce7f9118343245a533ef70386e89e6e5e1b Mon Sep 17 00:00:00 2001 From: Mike Ciechan Date: Tue, 25 Oct 2022 02:52:33 +0100 Subject: [PATCH 2/3] Adding AllowupdateBranch release date --- Octokit/Models/Request/RepositoryUpdate.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Octokit/Models/Request/RepositoryUpdate.cs b/Octokit/Models/Request/RepositoryUpdate.cs index 9c10fd2e5e..a671fd991f 100644 --- a/Octokit/Models/Request/RepositoryUpdate.cs +++ b/Octokit/Models/Request/RepositoryUpdate.cs @@ -115,7 +115,10 @@ public RepositoryUpdate() { } public bool? AllowForking { get; set; } /// - /// Optional. Get or set whether to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. The default is null (do not update). The default when created is false. + /// Optional. Get or set whether to always allow a pull request head branch that is behind its base branch + /// to be updated even if it is not required to be up to date before merging, or false otherwise. + /// The default is null (do not update). The default when created is false. + /// Available since GitHub Enterprise 3.1 (2021-05-06) /// public bool? AllowUpdateBranch { get; set; } From 74683652067b414a20b733f641eefa0ba4b850ff Mon Sep 17 00:00:00 2001 From: Mike Ciechan Date: Tue, 25 Oct 2022 03:19:32 +0100 Subject: [PATCH 3/3] Adding setting to ctor --- Octokit/Models/Response/Repository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Octokit/Models/Response/Repository.cs b/Octokit/Models/Response/Repository.cs index 1f7bf759ae..6de79eaaad 100644 --- a/Octokit/Models/Response/Repository.cs +++ b/Octokit/Models/Response/Repository.cs @@ -17,7 +17,7 @@ public Repository(long id) Id = id; } - public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, string sshUrl, string svnUrl, string mirrorUrl, long id, string nodeId, User owner, string name, string fullName, bool isTemplate, string description, string homepage, string language, bool @private, bool fork, int forksCount, int stargazersCount, string defaultBranch, int openIssuesCount, DateTimeOffset? pushedAt, DateTimeOffset createdAt, DateTimeOffset updatedAt, RepositoryPermissions permissions, Repository parent, Repository source, LicenseMetadata license, bool hasIssues, bool hasWiki, bool hasDownloads, bool hasPages, int subscribersCount, long size, bool? allowRebaseMerge, bool? allowSquashMerge, bool? allowMergeCommit, bool archived, int watchersCount, bool? deleteBranchOnMerge, RepositoryVisibility visibility, IEnumerable topics, bool? allowAutoMerge) + public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, string sshUrl, string svnUrl, string mirrorUrl, long id, string nodeId, User owner, string name, string fullName, bool isTemplate, string description, string homepage, string language, bool @private, bool fork, int forksCount, int stargazersCount, string defaultBranch, int openIssuesCount, DateTimeOffset? pushedAt, DateTimeOffset createdAt, DateTimeOffset updatedAt, RepositoryPermissions permissions, Repository parent, Repository source, LicenseMetadata license, bool hasIssues, bool hasWiki, bool hasDownloads, bool hasPages, int subscribersCount, long size, bool? allowRebaseMerge, bool? allowSquashMerge, bool? allowMergeCommit, bool archived, int watchersCount, bool? deleteBranchOnMerge, RepositoryVisibility visibility, IEnumerable topics, bool? allowAutoMerge, bool? allowUpdateBranch) { Url = url; HtmlUrl = htmlUrl; @@ -65,6 +65,7 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st DeleteBranchOnMerge = deleteBranchOnMerge; Visibility = visibility; AllowAutoMerge = allowAutoMerge; + AllowUpdateBranch = allowUpdateBranch; } public string Url { get; private set; }