Add DeleteBranchOnMerge option for repositories (#2268)

This commit is contained in:
Sam Cackett
2021-02-13 20:29:09 +00:00
committed by GitHub
parent 20549430e5
commit 46787d2cb8
4 changed files with 89 additions and 1 deletions

View File

@@ -81,6 +81,8 @@ namespace Octokit
/// Optional. Gets or sets the Id of the team to grant access to this repository. This is only valid when creating a repository for an organization.
/// </summary>
public int? TeamId { get; set; }
public bool? DeleteBranchOnMerge { get; set; }
internal string DebuggerDisplay
{

View File

@@ -77,6 +77,8 @@ namespace Octokit
/// Optional. Allows the "Create a merge commit" merge method to be used.
/// </summary>
public bool? AllowMergeCommit { get; set; }
public bool? DeleteBranchOnMerge { get; set; }
/// <summary>
/// Optional. True to archive this repository. Note: you cannot unarchive repositories through the API.

View File

@@ -14,7 +14,7 @@ namespace Octokit
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)
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)
{
Url = url;
HtmlUrl = htmlUrl;
@@ -56,6 +56,7 @@ namespace Octokit
AllowMergeCommit = allowMergeCommit;
Archived = archived;
WatchersCount = watchersCount;
DeleteBranchOnMerge = deleteBranchOnMerge;
}
public string Url { get; protected set; }
@@ -142,6 +143,8 @@ namespace Octokit
public bool Archived { get; protected set; }
public bool? DeleteBranchOnMerge { get; protected set; }
internal string DebuggerDisplay
{
get