diff --git a/Octokit.Tests.Integration/Helpers/OrganizationRepositoryWithTeamContext.cs b/Octokit.Tests.Integration/Helpers/OrganizationRepositoryWithTeamContext.cs
index d827f25f..88eef8cf 100644
--- a/Octokit.Tests.Integration/Helpers/OrganizationRepositoryWithTeamContext.cs
+++ b/Octokit.Tests.Integration/Helpers/OrganizationRepositoryWithTeamContext.cs
@@ -34,6 +34,7 @@ namespace Octokit.Tests.Integration.Helpers
true,
true,
true,
+ true,
false,
true);
@@ -55,6 +56,8 @@ namespace Octokit.Tests.Integration.Helpers
true,
true,
true,
+ true,
+ true,
false,
true);
diff --git a/Octokit.Tests.Integration/Reactive/ObservableRepositoryBranchesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableRepositoryBranchesClientTests.cs
index d35a4e8d..4ed3b969 100644
--- a/Octokit.Tests.Integration/Reactive/ObservableRepositoryBranchesClientTests.cs
+++ b/Octokit.Tests.Integration/Reactive/ObservableRepositoryBranchesClientTests.cs
@@ -191,6 +191,7 @@ namespace Octokit.Tests.Integration.Reactive
new BranchProtectionRequiredStatusChecksUpdate(false, new[] { "new" }),
new BranchProtectionRequiredReviewsUpdate(new BranchProtectionRequiredReviewsDismissalRestrictionsUpdate(false), false, false, 2),
new BranchProtectionPushRestrictionsUpdate(),
+ true,
false,
true,
true,
@@ -211,6 +212,7 @@ namespace Octokit.Tests.Integration.Reactive
Assert.Empty(protection.Restrictions.Teams);
Assert.Empty(protection.Restrictions.Users);
+ Assert.True(protection.RequiredSignatures.Enabled);
Assert.False(protection.EnforceAdmins.Enabled);
Assert.True(protection.RequiredLinearHistory.Enabled);
Assert.True(protection.AllowForcePushes.Enabled);
@@ -230,6 +232,7 @@ namespace Octokit.Tests.Integration.Reactive
new BranchProtectionRequiredStatusChecksUpdate(false, new[] { "new" }),
new BranchProtectionRequiredReviewsUpdate(new BranchProtectionRequiredReviewsDismissalRestrictionsUpdate(false), false, false, 2),
new BranchProtectionPushRestrictionsUpdate(),
+ true,
false,
true,
true,
@@ -250,6 +253,7 @@ namespace Octokit.Tests.Integration.Reactive
Assert.Empty(protection.Restrictions.Teams);
Assert.Empty(protection.Restrictions.Users);
+ Assert.True(protection.RequiredSignatures.Enabled);
Assert.False(protection.EnforceAdmins.Enabled);
Assert.True(protection.RequiredLinearHistory.Enabled);
Assert.True(protection.AllowForcePushes.Enabled);
diff --git a/Octokit/Models/Request/BranchProtectionUpdate.cs b/Octokit/Models/Request/BranchProtectionUpdate.cs
index d78de64d..dcc485e4 100644
--- a/Octokit/Models/Request/BranchProtectionUpdate.cs
+++ b/Octokit/Models/Request/BranchProtectionUpdate.cs
@@ -112,6 +112,7 @@ namespace Octokit
/// Specifies the requested status check settings. Pass null to disable status checks
/// Specifies if reviews are required to merge the pull request. Pass null to disable required reviews
/// Specifies the requested push access restrictions (applies only to Organization owned repositories). Pass null to disable push access restrictions
+ /// Specifies whether commits to a branch are required to be signed by gpg keys
/// Specifies whether the protections applied to this branch also apply to repository admins
/// Enforces a linear commit Git history
/// Permits force pushes to the protected branch
@@ -122,6 +123,7 @@ namespace Octokit
public BranchProtectionSettingsUpdate(BranchProtectionRequiredStatusChecksUpdate requiredStatusChecks,
BranchProtectionRequiredReviewsUpdate requiredPullRequestReviews,
BranchProtectionPushRestrictionsUpdate restrictions,
+ bool requiredSignatures,
bool enforceAdmins,
bool requiredLinearHistory,
bool? allowForcePushes,
@@ -133,6 +135,7 @@ namespace Octokit
RequiredStatusChecks = requiredStatusChecks;
RequiredPullRequestReviews = requiredPullRequestReviews;
Restrictions = restrictions;
+ RequiredSignatures = requiredSignatures;
EnforceAdmins = enforceAdmins;
LockBranch = lockBranch;
RequiredLinearHistory = requiredLinearHistory;
@@ -159,6 +162,11 @@ namespace Octokit
///
[SerializeNull]
public BranchProtectionPushRestrictionsUpdate Restrictions { get; protected set; }
+
+ ///
+ /// Specifies whether the signed commits are required for this branch
+ ///
+ public bool RequiredSignatures { get; set; }
///
/// Specifies whether the protections applied to this branch also apply to repository admins