Repository: PyGithub/PyGithub

Issue:
Make `Branch.edit_*` return Branch objects
The API returns the `BranchProtection` object, the `Branch.edit_protection` method should return it:
https://github.com/PyGithub/PyGithub/blob/294c0cc9c5a0a5f127dd12ab2cc7ac7ca9c3e59c/github/Branch.py#L272-L277

The same holds for the other `edit_` methods in `Branch`.


Discussion:
Hi @EnricoMi, 

first of all, thanks so much for keeping this project going. Also, am I understanding this correctly that 
 `Branch.edit_protection` needs to have a return statement similar to:
```python
  return github.BranchProtection.BranchProtection(self._requester, headers, data, completed=True)
```

Resolving patch:
diff --git a/github/Branch.py b/github/Branch.py
--- a/github/Branch.py
+++ b/github/Branch.py
@@ -134,7 +134,7 @@ def edit_protection(
         teams_bypass_pull_request_allowances: Opt[list[str]] = NotSet,
         apps_bypass_pull_request_allowances: Opt[list[str]] = NotSet,
         block_creations: Opt[bool] = NotSet,
-    ) -> None:
+    ) -> BranchProtection:
         """
         :calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection <https://docs.github.com/en/rest/reference/repos#get-branch-protection>`_
 
@@ -276,6 +276,8 @@ def edit_protection(
             input=post_parameters,
         )
 
+        return github.BranchProtection.BranchProtection(self._requester, headers, data, completed=True)
+
     def remove_protection(self) -> None:
         """
         :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection <https://docs.github.com/en/rest/reference/repos#branches>`_
@@ -297,7 +299,7 @@ def edit_required_status_checks(
         self,
         strict: Opt[bool] = NotSet,
         contexts: Opt[list[str]] = NotSet,
-    ) -> None:
+    ) -> RequiredStatusChecks:
         """
         :calls: `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks <https://docs.github.com/en/rest/reference/repos#branches>`_
         """
@@ -311,6 +313,8 @@ def edit_required_status_checks(
             input=post_parameters,
         )
 
+        return github.RequiredStatusChecks.RequiredStatusChecks(self._requester, headers, data, completed=True)
+
     def remove_required_status_checks(self) -> None:
         """
         :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks <https://docs.github.com/en/rest/reference/repos#branches>`_
@@ -341,7 +345,7 @@ def edit_required_pull_request_reviews(
         dismiss_stale_reviews: Opt[bool] = NotSet,
         require_code_owner_reviews: Opt[bool] = NotSet,
         required_approving_review_count: Opt[int] = NotSet,
-    ) -> None:
+    ) -> RequiredStatusChecks:
         """
         :calls: `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews <https://docs.github.com/en/rest/reference/repos#branches>`_
         """
@@ -373,6 +377,8 @@ def edit_required_pull_request_reviews(
             input=post_parameters,
         )
 
+        return github.RequiredStatusChecks.RequiredStatusChecks(self._requester, headers, data, completed=True)
+
     def remove_required_pull_request_reviews(self) -> None:
         """
         :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews <https://docs.github.com/en/rest/reference/repos#branches>`_


Test patch: