Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding repo allowupdatebranch #2600

Merged
merged 5 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Octokit/Models/Request/RepositoryUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ public RepositoryUpdate() { }
/// </summary>
public bool? AllowForking { get; set; }

/// <summary>
/// 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)
/// </summary>
public bool? AllowUpdateBranch { get; set; }

internal string DebuggerDisplay => new SimpleJsonSerializer().Serialize(this);
}
}
5 changes: 4 additions & 1 deletion Octokit/Models/Response/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> 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<string> topics, bool? allowAutoMerge, bool? allowUpdateBranch)
{
Url = url;
HtmlUrl = htmlUrl;
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -158,6 +159,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
{
Expand Down