diff --git a/Octokit/Models/Request/BranchProtectionUpdate.cs b/Octokit/Models/Request/BranchProtectionUpdate.cs index 8999ea97..0dfca599 100644 --- a/Octokit/Models/Request/BranchProtectionUpdate.cs +++ b/Octokit/Models/Request/BranchProtectionUpdate.cs @@ -15,7 +15,7 @@ namespace Octokit /// /// Create a BranchProtection update request /// - /// Specifies the requested status check settings + /// Specifies the requested status check settings. Pass null to disable status checks public BranchProtectionSettingsUpdate(BranchProtectionRequiredStatusChecksUpdate requiredStatusChecks) { RequiredStatusChecks = requiredStatusChecks; @@ -25,8 +25,8 @@ namespace Octokit /// /// Create a BranchProtection update request /// - /// Specifies the requested status check settings. Pass null to disable status checks - /// Specifies the requested push access restrictions (applies only to Organization owned repositories). Pass null to disable push access restrictions + /// Specifies the requested status check settings. Pass null to disable status checks + /// Specifies the requested push access restrictions (applies only to Organization owned repositories). Pass null to disable push access restrictions public BranchProtectionSettingsUpdate(BranchProtectionRequiredStatusChecksUpdate requiredStatusChecks, ProtectedBranchRestrictionsUpdate restrictions) { RequiredStatusChecks = requiredStatusChecks; @@ -34,7 +34,7 @@ namespace Octokit } /// - /// Status check settings for protected branch + /// Status check settings for the protected branch /// [SerializeNull] public BranchProtectionRequiredStatusChecksUpdate RequiredStatusChecks { get; protected set; } @@ -55,7 +55,7 @@ namespace Octokit } /// - /// Specifies the requested status check settings for branch protection + /// Specifies settings for status checks which must pass before branches can be merged into the protected branch /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class BranchProtectionRequiredStatusChecksUpdate @@ -98,13 +98,13 @@ namespace Octokit } /// - /// Specifies people or teams allowed to push to this branch. Required status checks will still prevent these people from merging if the checks fail. + /// Specifies people or teams allowed to push to the protected branch. Required status checks will still prevent these people from merging if the checks fail /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ProtectedBranchRestrictionsUpdate { /// - /// Specify people or teams (in addition to Administrators) allowed to push to this branch. Required status checks will still prevent these people from merging if the checks fail. + /// Specify people or teams (in addition to Administrators) allowed to push to this branch. Required status checks will still prevent these people from merging if the checks fail /// /// Teams allowed to push to this branch (pass empty array if no teams) /// Users allowed to push to this branch (pass empty array if no users) diff --git a/Octokit/Models/Response/BranchProtection.cs b/Octokit/Models/Response/BranchProtection.cs index 0d1579db..d7f64fdc 100644 --- a/Octokit/Models/Response/BranchProtection.cs +++ b/Octokit/Models/Response/BranchProtection.cs @@ -124,11 +124,17 @@ namespace Octokit { get { - return String.Format(CultureInfo.InvariantCulture, "StatusChecks: {0} Restrictions: {1}", RequiredStatusChecks.DebuggerDisplay, Restrictions.DebuggerDisplay); + return String.Format(CultureInfo.InvariantCulture, + "StatusChecks: {0} Restrictions: {1}", + RequiredStatusChecks == null ? "disabled" : RequiredStatusChecks.DebuggerDisplay, + Restrictions == null ? "disabled" : Restrictions.DebuggerDisplay); } } } + /// + /// Specifies settings for status checks which must pass before branches can be merged into the protected branch + /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class BranchProtectionRequiredStatusChecks { @@ -160,11 +166,18 @@ namespace Octokit { get { - return String.Format(CultureInfo.InvariantCulture, "IncludeAdmins: {0} Strict: {1} Contexts: {2}", IncludeAdmins, Strict, Contexts == null ? "" : String.Join(",", Contexts)); + return String.Format(CultureInfo.InvariantCulture, + "IncludeAdmins: {0} Strict: {1} Contexts: {2}", + IncludeAdmins, + Strict, + Contexts == null ? "" : String.Join(",", Contexts)); } } } + /// + /// Specifies people or teams allowed to push to the protected branch. Required status checks will still prevent these people from merging if the checks fail + /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ProtectedBranchRestrictions { @@ -190,7 +203,10 @@ namespace Octokit { get { - return String.Format(CultureInfo.InvariantCulture, "Teams: {0} Users: {1}", Teams == null ? "" : String.Join(",", Teams), Users == null ? "" : String.Join(",", Users)); + return String.Format(CultureInfo.InvariantCulture, + "Teams: {0} Users: {1}", + Teams == null ? "" : String.Join(",", Teams), + Users == null ? "" : String.Join(",", Users)); } } }