+ python scripts/openapi.py --dry-run apply methods openapi.spec.json openapi.index NamedUser
Using spec openapi.spec.json
Applying API schemas to PyGithub class NamedUser
Applying spec openapi.spec.json to github.NamedUser.NamedUser (github/NamedUser.py)
- Updating method get_repo
- Updating method get_repos
Cannot update url_parameters as statement cannot be found.
- Updating method get_starred
Diff:
--- 
+++ 
@@ -299,7 +299,19 @@
     @openapi_parameter(name="repo", input=True, docstring_prepend='- "{repo}": ')
     def get_repo(self, name: str) -> Repository:
         """
+        Get a repository
+
+        The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
+
+        > [!NOTE]
+        > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
+        > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions.
+
         :calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
+        :param name: The name of the repository in the form "{owner}/{repo}" with:
+            
+            - "{owner}": The account owner of the repository. The name is not case sensitive.
+            - "{repo}": The name of the repository without the `.git` extension. The name is not case sensitive.
         """
         assert isinstance(name, str), name
         url = f"/repos/{self.login}/{name}"
@@ -312,8 +324,18 @@
         direction: Opt[str] = NotSet,
     ) -> PaginatedList[Repository]:
         """
+        List repositories for a user
+
+        Lists public repositories for the specified user.
+
         :calls: `GET /users/{username}/repos <https://docs.github.com/en/rest/reference/repos>`_
+        :param type: Limit results to repositories of the specified type.
+        :param sort: The property to sort the results by.
+        :param direction: The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.
         """
+        assert is_optional(type, str), type
+        assert is_optional(sort, str), sort
+        assert is_optional(direction, str), direction
         assert type is NotSet or isinstance(type, str), type
         assert sort is NotSet or isinstance(sort, str), sort
         assert direction is NotSet or isinstance(direction, str), direction

Class NamedUser changed
+ python scripts/openapi.py --dry-run apply methods --rewrite openapi.spec.json openapi.index NamedUser
Using spec openapi.spec.json
Applying API schemas to PyGithub class NamedUser
Applying spec openapi.spec.json to github.NamedUser.NamedUser (github/NamedUser.py)
- Updating method get_repo
- Updating method get_repos
- Updating method get_starred
Diff:
--- 
+++ 
@@ -297,9 +297,21 @@
     )
     @openapi_parameter(name="owner", input=True, docstring_prepend='- "{owner}": ')
     @openapi_parameter(name="repo", input=True, docstring_prepend='- "{repo}": ')
-    def get_repo(self, name: str) -> Repository:
+    def get_repo(self, name: str) -> dict[str, Any]:
         """
-        :calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
+        Get a repository
+
+        The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
+
+        > [!NOTE]
+        > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
+        > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions.
+
+        :calls: `GET /repos/{owner}/{repo} <https://docs.github.com/rest/repos/repos#get-a-repository>`_
+        :param name: The name of the repository in the form "{owner}/{repo}" with:
+            
+            - "{owner}": The account owner of the repository. The name is not case sensitive.
+            - "{repo}": The name of the repository without the `.git` extension. The name is not case sensitive.
         """
         assert isinstance(name, str), name
         url = f"/repos/{self.login}/{name}"
@@ -310,10 +322,27 @@
         type: Opt[str] = NotSet,
         sort: Opt[str] = NotSet,
         direction: Opt[str] = NotSet,
-    ) -> PaginatedList[Repository]:
+    ) -> PaginatedList[dict[str, Any]]:
         """
-        :calls: `GET /users/{username}/repos <https://docs.github.com/en/rest/reference/repos>`_
+        List repositories for a user
+
+        Lists public repositories for the specified user.
+
+        :calls: `GET /users/{username}/repos <https://docs.github.com/rest/repos/repos#list-repositories-for-a-user>`_
+        :param type: Limit results to repositories of the specified type.
+        :param sort: The property to sort the results by.
+        :param direction: The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.
         """
+        assert is_optional(type, str), type
+        assert is_optional(sort, str), sort
+        assert is_optional(direction, str), direction
+        url_parameters = NotSet.remove_unset_items(
+            {
+                "type": type,
+                "sort": sort,
+                "direction": direction,
+            }
+        )
         assert type is NotSet or isinstance(type, str), type
         assert sort is NotSet or isinstance(sort, str), sort
         assert direction is NotSet or isinstance(direction, str), direction

Class NamedUser changed
+ python scripts/openapi.py apply methods --rewrite openapi.spec.json openapi.index NamedUser
Using spec openapi.spec.json
Applying API schemas to PyGithub class NamedUser
Applying spec openapi.spec.json to github.NamedUser.NamedUser (github/NamedUser.py)
- Updating method get_repo
- Updating method get_repos
- Updating method get_starred
Class NamedUser changed
+ python scripts/openapi.py index github openapi.spec.json openapi.index
Indexing 5 Python files
Indexed 14 classes
Indexed 4 paths
Indexed 7 schemas
Indexing OpenAPI spec
