diff --git a/Octokit/Models/Response/Branch.cs b/Octokit/Models/Response/Branch.cs
index 6317fd56..3054c412 100644
--- a/Octokit/Models/Response/Branch.cs
+++ b/Octokit/Models/Response/Branch.cs
@@ -9,11 +9,24 @@ namespace Octokit
{
public Branch() { }
-#pragma warning disable CS0618 // Type or member is obsolete
- public Branch(string name, GitReference commit, BranchProtection protection)
+ public Branch(string name, GitReference commit, bool @protected)
{
Name = name;
Commit = commit;
+ Protected = @protected;
+ }
+
+#pragma warning disable CS0618 // Type or member is obsolete
+ public Branch(string name, GitReference commit, BranchProtection protection)
+ : this(name, commit, protection, false)
+ {
+ }
+#pragma warning restore CS0618 // Type or member is obsolete
+
+#pragma warning disable CS0618 // Type or member is obsolete
+ public Branch(string name, GitReference commit, BranchProtection protection, bool @protected)
+ : this(name, commit, @protected)
+ {
Protection = protection;
}
#pragma warning restore CS0618 // Type or member is obsolete
@@ -30,6 +43,11 @@ namespace Octokit
[Obsolete("BranchProtection preview functionality in the GitHub API has had breaking changes. This existing implementation will cease to work when the preview period ends.", false)]
public BranchProtection Protection { get; protected set; }
+ ///
+ /// Whether this is protected.
+ ///
+ public bool Protected { get; protected set; }
+
///
/// The history for this .
///