Skip to content

Commit b998d08

Browse files
[feat]: Adding repo allowupdatebranch
1 parent e3c06ba commit b998d08

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Octokit/Models/Request/RepositoryUpdate.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ public RepositoryUpdate() { }
114114
/// </summary>
115115
public bool? AllowForking { get; set; }
116116

117+
/// <summary>
118+
/// Optional. Get or set whether to always allow a pull request head branch that is behind its base branch
119+
/// to be updated even if it is not required to be up to date before merging, or false otherwise.
120+
/// The default is null (do not update). The default when created is false.
121+
/// Available since GitHub Enterprise 3.1 (2021-05-06)
122+
/// </summary>
123+
public bool? AllowUpdateBranch { get; set; }
124+
117125
internal string DebuggerDisplay => new SimpleJsonSerializer().Serialize(this);
118126
}
119127
}

Octokit/Models/Response/Repository.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public Repository(long id)
1717
Id = id;
1818
}
1919

20-
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<string> topics, bool? allowAutoMerge)
20+
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<string> topics, bool? allowAutoMerge, bool? allowUpdateBranch)
2121
{
2222
Url = url;
2323
HtmlUrl = htmlUrl;
@@ -65,6 +65,7 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st
6565
DeleteBranchOnMerge = deleteBranchOnMerge;
6666
Visibility = visibility;
6767
AllowAutoMerge = allowAutoMerge;
68+
AllowUpdateBranch = allowUpdateBranch;
6869
}
6970

7071
public string Url { get; private set; }
@@ -158,6 +159,8 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st
158159
public RepositoryVisibility? Visibility { get; private set; }
159160

160161
public bool? AllowAutoMerge { get; private set; }
162+
163+
public bool? AllowUpdateBranch { get; private set; }
161164

162165
internal string DebuggerDisplay
163166
{

0 commit comments

Comments
 (0)