Repository: hub4j/github-api
Pull request #1732 (2023-10-20 15:41:25)

Add missing branch protection fields
# Description

<!-- Describe your change here -->

# Before submitting a PR:

- [ ] Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [ ] Add JavaDocs and other comments explaining the behavior. 
- [ ] When adding or updating methods that fetch entities, add `@link` JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest . 
- [ ] Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
- [ ] Push your changes to a branch other than `main`. You will create your PR from that branch.

# When creating a PR: 

- [ ] Fill in the "Description" above with clear summary of the changes. This includes:
  - [ ] If this PR fixes one or more issues, include "Fixes #<issue number>" lines for each issue. 
  - [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible. If not including links, explain why not.
- [ ] All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
- [ ] Enable "Allow edits from maintainers".



Patch:
diff --git a/src/main/java/org/kohsuke/github/GHBranchProtection.java b/src/main/java/org/kohsuke/github/GHBranchProtection.java
index 697686ce2..834544944 100644
--- a/src/main/java/org/kohsuke/github/GHBranchProtection.java
+++ b/src/main/java/org/kohsuke/github/GHBranchProtection.java
@@ -22,9 +22,30 @@ import static org.kohsuke.github.internal.Previews.ZZZAX;
 public class GHBranchProtection extends GitHubInteractiveObject {
     private static final String REQUIRE_SIGNATURES_URI = "/required_signatures";
 
+    @JsonProperty
+    private AllowDeletions allowDeletions;
+
+    @JsonProperty
+    private AllowForcePushes allowForcePushes;
+
+    @JsonProperty
+    private AllowForkSyncing allowForkSyncing;
+
+    @JsonProperty
+    private BlockCreations blockCreations;
+
     @JsonProperty
     private EnforceAdmins enforceAdmins;
 
+    @JsonProperty
+    private LockBranch lockBranch;
+
+    @JsonProperty
+    private RequiredConversationResolution requiredConversationResolution;
+
+    @JsonProperty
+    private RequiredLinearHistory requiredLinearHistory;
+
     @JsonProperty("required_pull_request_reviews")
     private RequiredReviews requiredReviews;
 
@@ -59,6 +80,42 @@ public class GHBranchProtection extends GitHubInteractiveObject {
         requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send();
     }
 
+    /**
+     * Gets allow deletions.
+     *
+     * @return the enforce admins
+     */
+    public AllowDeletions getAllowDeletions() {
+        return allowDeletions;
+    }
+
+    /**
+     * Gets allow force pushes.
+     *
+     * @return the enforce admins
+     */
+    public AllowForcePushes getAllowForcePushes() {
+        return allowForcePushes;
+    }
+
+    /**
+     * Gets allow fork syncing.
+     *
+     * @return the enforce admins
+     */
+    public AllowForkSyncing getAllowForkSyncing() {
+        return allowForkSyncing;
+    }
+
+    /**
+     * Gets block creations.
+     *
+     * @return the enforce admins
+     */
+    public BlockCreations getBlockCreations() {
+        return blockCreations;
+    }
+
     /**
      * Gets enforce admins.
      *
@@ -68,6 +125,33 @@ public class GHBranchProtection extends GitHubInteractiveObject {
         return enforceAdmins;
     }
 
+    /**
+     * Gets lock branch.
+     *
+     * @return the enforce admins
+     */
+    public LockBranch getLockBranch() {
+        return lockBranch;
+    }
+
+    /**
+     * Gets required conversation resolution.
+     *
+     * @return the enforce admins
+     */
+    public RequiredConversationResolution getRequiredConversationResolution() {
+        return requiredConversationResolution;
+    }
+
+    /**
+     * Gets required linear history.
+     *
+     * @return the enforce admins
+     */
+    public RequiredLinearHistory getRequiredLinearHistory() {
+        return requiredLinearHistory;
+    }
+
     /**
      * Gets required reviews.
      *
@@ -120,6 +204,74 @@ public class GHBranchProtection extends GitHubInteractiveObject {
         return root().createRequest().withPreview(ZZZAX);
     }
 
+    /**
+     * The type AllowDeletions.
+     */
+    public static class AllowDeletions {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
+    /**
+     * The type AllowForcePushes.
+     */
+    public static class AllowForcePushes {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
+    /**
+     * The type AllowForkSyncing.
+     */
+    public static class AllowForkSyncing {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
+    /**
+     * The type BlockCreations.
+     */
+    public static class BlockCreations {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
     /**
      * The type EnforceAdmins.
      */
@@ -149,6 +301,57 @@ public class GHBranchProtection extends GitHubInteractiveObject {
         }
     }
 
+    /**
+     * The type LockBranch.
+     */
+    public static class LockBranch {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
+    /**
+     * The type RequiredConversationResolution.
+     */
+    public static class RequiredConversationResolution {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
+    /**
+     * The type RequiredLinearHistory.
+     */
+    public static class RequiredLinearHistory {
+        @JsonProperty
+        private boolean enabled;
+
+        /**
+         * Is enabled boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isEnabled() {
+            return enabled;
+        }
+    }
+
     /**
      * The type RequiredReviews.
      */
@@ -156,10 +359,15 @@ public class GHBranchProtection extends GitHubInteractiveObject {
         @JsonProperty("dismissal_restrictions")
         private Restrictions dismissalRestriction;
 
+        @JsonProperty
         private boolean dismissStaleReviews;
 
+        @JsonProperty
         private boolean requireCodeOwnerReviews;
 
+        @JsonProperty
+        private boolean requireLastPushApproval;
+
         @JsonProperty("required_approving_review_count")
         private int requiredReviewers;
 
@@ -202,6 +410,15 @@ public class GHBranchProtection extends GitHubInteractiveObject {
             return requireCodeOwnerReviews;
         }
 
+        /**
+         * Is require last push approval boolean.
+         *
+         * @return the boolean
+         */
+        public boolean isRequireLastPushApproval() {
+            return requireLastPushApproval;
+        }
+
         /**
          * Gets required reviewers.
          *
diff --git a/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java b/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java
index 9d2270391..ec21b3168 100644
--- a/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java
+++ b/src/main/java/org/kohsuke/github/GHBranchProtectionBuilder.java
@@ -27,7 +27,7 @@ import static org.kohsuke.github.internal.Previews.LUKE_CAGE;
 public class GHBranchProtectionBuilder {
     private final GHBranch branch;
 
-    private boolean enforceAdmins;
+    private Map<String, Object> fields = new HashMap<String, Object>();
     private Map<String, Object> prReviews;
     private Restrictions restrictions;
     private StatusChecks statusChecks;
@@ -40,6 +40,7 @@ public class GHBranchProtectionBuilder {
      */
     GHBranchProtectionBuilder(GHBranch branch) {
         this.branch = branch;
+        includeAdmins(false);
     }
 
     /**
@@ -66,6 +67,95 @@ public class GHBranchProtectionBuilder {
         return this;
     }
 
+    /**
+     * Allow deletion of the protected branch.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowDeletions() {
+        return allowDeletions(true);
+    }
+
+    /**
+     * Allows deletion of the protected branch by anyone with write access to the repository. Set to true to allow
+     * deletion of the protected branch. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowDeletions(boolean v) {
+        fields.put("allow_deletions", v);
+        return this;
+    }
+
+    /**
+     * Permits force pushes.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowForcePushes() {
+        return allowForcePushes(true);
+    }
+
+    /**
+     * Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow
+     * force pushes. Set to false to block force pushes. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowForcePushes(boolean v) {
+        fields.put("allow_force_pushes", v);
+        return this;
+    }
+
+    /**
+     * Allow fork syncing.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowForkSyncing() {
+        return allowForkSyncing(true);
+    }
+
+    /**
+     * Whether users can pull changes from upstream when the branch is locked. Set to true to allow fork syncing. Set to
+     * true to enable. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder allowForkSyncing(boolean v) {
+        fields.put("allow_fork_syncing", v);
+        return this;
+    }
+
+    /**
+     * Restrict new branch creation.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder blockCreations() {
+        return blockCreations(true);
+    }
+
+    /**
+     * If set to true, the restrictions branch protection settings which limits who can push will also block pushes
+     * which create new branches, unless the push is initiated by a user, team, or app which has the ability to push.
+     * Set to true to restrict new branch creation. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder blockCreations(boolean v) {
+        fields.put("block_creations", v);
+        return this;
+    }
+
     /**
      * Dismiss stale reviews gh branch protection builder.
      *
@@ -96,10 +186,10 @@ public class GHBranchProtectionBuilder {
      */
     public GHBranchProtection enable() throws IOException {
         return requester().method("PUT")
+                .with(fields)
                 .withNullable("required_status_checks", statusChecks)
                 .withNullable("required_pull_request_reviews", prReviews)
                 .withNullable("restrictions", restrictions)
-                .withNullable("enforce_admins", enforceAdmins)
                 .withUrlPath(branch.getProtectionUrl().toString())
                 .fetch(GHBranchProtection.class);
     }
@@ -121,7 +211,29 @@ public class GHBranchProtectionBuilder {
      * @return the gh branch protection builder
      */
     public GHBranchProtectionBuilder includeAdmins(boolean v) {
-        enforceAdmins = v;
+        fields.put("enforce_admins", v);
+        return this;
+    }
+
+    /**
+     * Set the branch as read-only.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder lockBranch() {
+        return lockBranch(true);
+    }
+
+    /**
+     * Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Set to
+     * true to enable. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder lockBranch(boolean v) {
+        fields.put("lock_branch", v);
         return this;
     }
 
@@ -179,6 +291,73 @@ public class GHBranchProtectionBuilder {
         return this;
     }
 
+    /**
+     * Enable the most recent push must be approved by someone other than the person who pushed it.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requireLastPushApproval() {
+        return requireLastPushApproval(true);
+    }
+
+    /**
+     * Whether the most recent push must be approved by someone other than the person who pushed it. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requireLastPushApproval(boolean v) {
+        getPrReviews().put("require_last_push_approval", v);
+        return this;
+    }
+
+    /**
+     * Require all conversations on code to be resolved before a pull request can be merged into a branch that matches
+     * this rule.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requiredConversationResolution() {
+        return requiredConversationResolution(true);
+    }
+
+    /**
+     * Require all conversations on code to be resolved before a pull request can be merged into a branch that matches
+     * this rule. Set to true to enable. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requiredConversationResolution(boolean v) {
+        fields.put("required_conversation_resolution", v);
+        return this;
+    }
+
+    /**
+     * Enforce a linear commit Git history.
+     *
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requiredLinearHistory() {
+        return requiredLinearHistory(true);
+    }
+
+    /**
+     * Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true
+     * to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must
+     * allow squash merging or rebase merging before you can enable a linear commit history. Default: false.
+     *
+     * @param v
+     *            the v
+     * @return the gh branch protection builder
+     */
+    public GHBranchProtectionBuilder requiredLinearHistory(boolean v) {
+        fields.put("required_linear_history", v);
+        return this;
+    }
+
     /**
      * Require reviews gh branch protection builder.
      *


Test patch:
diff --git a/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java b/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java
index 3624068ee..5254b3a70 100755
--- a/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java
+++ b/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java
@@ -2,7 +2,14 @@ package org.kohsuke.github;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.kohsuke.github.GHBranchProtection.AllowDeletions;
+import org.kohsuke.github.GHBranchProtection.AllowForcePushes;
+import org.kohsuke.github.GHBranchProtection.AllowForkSyncing;
+import org.kohsuke.github.GHBranchProtection.BlockCreations;
 import org.kohsuke.github.GHBranchProtection.EnforceAdmins;
+import org.kohsuke.github.GHBranchProtection.LockBranch;
+import org.kohsuke.github.GHBranchProtection.RequiredConversationResolution;
+import org.kohsuke.github.GHBranchProtection.RequiredLinearHistory;
 import org.kohsuke.github.GHBranchProtection.RequiredReviews;
 import org.kohsuke.github.GHBranchProtection.RequiredStatusChecks;
 
@@ -45,9 +52,17 @@ public class GHBranchProtectionTest extends AbstractGitHubWireMockTest {
                 .addRequiredChecks("test-status-check")
                 .requireBranchIsUpToDate()
                 .requireCodeOwnReviews()
+                .requireLastPushApproval()
                 .dismissStaleReviews()
                 .requiredReviewers(2)
+                .allowDeletions()
+                .allowForcePushes()
+                .allowForkSyncing()
+                .blockCreations()
                 .includeAdmins()
+                .lockBranch()
+                .requiredConversationResolution()
+                .requiredLinearHistory()
                 .enable();
 
         verifyBranchProtection(protection);
@@ -67,11 +82,40 @@ public class GHBranchProtectionTest extends AbstractGitHubWireMockTest {
         assertThat(requiredReviews, notNullValue());
         assertThat(requiredReviews.isDismissStaleReviews(), is(true));
         assertThat(requiredReviews.isRequireCodeOwnerReviews(), is(true));
+        assertThat(requiredReviews.isRequireLastPushApproval(), is(true));
         assertThat(requiredReviews.getRequiredReviewers(), equalTo(2));
 
+        AllowDeletions allowDeletions = protection.getAllowDeletions();
+        assertThat(allowDeletions, notNullValue());
+        assertThat(allowDeletions.isEnabled(), is(true));
+
+        AllowForcePushes allowForcePushes = protection.getAllowForcePushes();
+        assertThat(allowForcePushes, notNullValue());
+        assertThat(allowForcePushes.isEnabled(), is(true));
+
+        AllowForkSyncing allowForkSyncing = protection.getAllowForkSyncing();
+        assertThat(allowForkSyncing, notNullValue());
+        assertThat(allowForkSyncing.isEnabled(), is(true));
+
+        BlockCreations blockCreations = protection.getBlockCreations();
+        assertThat(blockCreations, notNullValue());
+        assertThat(blockCreations.isEnabled(), is(true));
+
         EnforceAdmins enforceAdmins = protection.getEnforceAdmins();
         assertThat(enforceAdmins, notNullValue());
         assertThat(enforceAdmins.isEnabled(), is(true));
+
+        LockBranch lockBranch = protection.getLockBranch();
+        assertThat(lockBranch, notNullValue());
+        assertThat(lockBranch.isEnabled(), is(true));
+
+        RequiredConversationResolution requiredConversationResolution = protection.getRequiredConversationResolution();
+        assertThat(requiredConversationResolution, notNullValue());
+        assertThat(requiredConversationResolution.isEnabled(), is(true));
+
+        RequiredLinearHistory requiredLinearHistory = protection.getRequiredLinearHistory();
+        assertThat(requiredLinearHistory, notNullValue());
+        assertThat(requiredLinearHistory.isEnabled(), is(true));
     }
 
     /**
diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
index ee226bab7..a793b4cef 100644
--- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
+++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
@@ -12,19 +12,32 @@
     "url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/main/protection/required_pull_request_reviews",
     "dismiss_stale_reviews": true,
     "require_code_owner_reviews": true,
-    "required_approving_review_count": 2
+    "required_approving_review_count": 2,
+    "require_last_push_approval": true
+  },
+  "allow_deletions": {
+    "enabled": true
+  },
+  "allow_force_pushes": {
+    "enabled": true
+  },
+  "allow_fork_syncing": {
+    "enabled": true
+  },
+  "block_creations": {
+    "enabled": true
   },
   "enforce_admins": {
     "url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/main/protection/enforce_admins",
     "enabled": true
   },
-  "required_linear_history": {
-    "enabled": false
+  "lock_branch": {
+    "enabled": true
   },
-  "allow_force_pushes": {
-    "enabled": false
+  "required_conversation_resolution": {
+    "enabled": true
   },
-  "allow_deletions": {
-    "enabled": false
+  "required_linear_history": {
+    "enabled": true
   }
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-5.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-5.json
index ee226bab7..a793b4cef 100644
--- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-5.json
+++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-5.json
@@ -12,19 +12,32 @@
     "url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/main/protection/required_pull_request_reviews",
     "dismiss_stale_reviews": true,
     "require_code_owner_reviews": true,
-    "required_approving_review_count": 2
+    "required_approving_review_count": 2,
+    "require_last_push_approval": true
+  },
+  "allow_deletions": {
+    "enabled": true
+  },
+  "allow_force_pushes": {
+    "enabled": true
+  },
+  "allow_fork_syncing": {
+    "enabled": true
+  },
+  "block_creations": {
+    "enabled": true
   },
   "enforce_admins": {
     "url": "https://api.github.com/repos/hub4j-test-org/temp-testEnableBranchProtections/branches/main/protection/enforce_admins",
     "enabled": true
   },
-  "required_linear_history": {
-    "enabled": false
+  "lock_branch": {
+    "enabled": true
   },
-  "allow_force_pushes": {
-    "enabled": false
+  "required_conversation_resolution": {
+    "enabled": true
   },
-  "allow_deletions": {
-    "enabled": false
+  "required_linear_history": {
+    "enabled": true
   }
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
index 31a205713..3dfbbcf03 100644
--- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
+++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_hub4j-test-org_temp-testenablebranchprotections_branches_main_protection-4.json
@@ -11,7 +11,7 @@
     },
     "bodyPatterns": [
       {
-        "equalToJson": "{\"required_pull_request_reviews\":{\"required_approving_review_count\":2,\"require_code_owner_reviews\":true,\"dismiss_stale_reviews\":true},\"required_status_checks\":{\"contexts\":[\"test-status-check\"],\"strict\":true},\"restrictions\":null,\"enforce_admins\":true}",
+        "equalToJson": "{\"required_pull_request_reviews\":{\"required_approving_review_count\":2,\"require_code_owner_reviews\":true,\"dismiss_stale_reviews\":true,\"require_last_push_approval\":true},\"required_status_checks\":{\"contexts\":[\"test-status-check\"],\"strict\":true},\"restrictions\":null,\"allow_deletions\":true,\"allow_force_pushes\":true,\"allow_fork_syncing\":true,\"block_creations\":true,\"enforce_admins\":true,\"lock_branch\":true,\"required_conversation_resolution\":true,\"required_linear_history\":true}",
         "ignoreArrayOrder": true,
         "ignoreExtraElements": false
       }
@@ -49,4 +49,4 @@
   "uuid": "3cdd44cf-a62c-43f6-abad-de7c8b65bfe3",
   "persistent": true,
   "insertionIndex": 4
-}
\ No newline at end of file
+}