-----------------------------------
Important
^^^^^^^^^
This release introduces new way of authentication. All authentication-related arguments ``github.Github(login_or_token=…, password=…, jwt=…, app_auth=…)``
and ``github.GithubIntegration(integration_id=…, private_key=…, jwt_expiry=…, jwt_issued_at=…, jwt_algorithm=…)`` are replaced by a single ``auth=…`` argument.
Module ``github.Auth`` provides classes for all supported ways of authentication: ``Login``, ``Token``, ``AppAuth``, ``AppAuthToken``, ``AppInstallationAuth``, ``AppUserAuth``.
Old arguments are deprecated but continue to work. They are scheduled for removal for version 2.0 release.
This project has decided to move all typing information from ``.pyi`` files into the respective ``.py`` source files.
This will happen gradually over time.
Breaking Changes
^^^^^^^^^^^^^^^^
* The ``position`` argument in ``github.PullRequest.create_review_comment(position=…)`` has been renamed to ``line``.
This breaks user code that calls ``create_review_comment`` with keyword argument ``position``. Call with ``line=…`` instead.
Calling this method with positional arguments is not breaking.
* The ``jwt_expiry``, ``jwt_issued_at`` and ``jwt_algorithm`` arguments in ``github.GithubIntegration()`` have changed their position.
User code calling ``github.GithubIntegration(…)`` with these arguments as positional arguments breaks.
Please use keyword arguments: ``github.GithubIntegration(…, jwt_expiry=…, jwt_issued_at=…, jwt_algorithm=…)``.
* The ``since`` argument in ``github.PullRequest.get_review_comments(…)`` has changed position.``
User code calling ``github.PullRequest.get_review_comments(…)`` with this argument as positional argument breaks.
Please use keyword argument: ``github.PullRequest.get_review_comments(since=…)``.
Deprecation
^^^^^^^^^^^
* The use of ``github.Github(login_or_token=…)`` is deprecated, use ``github.Github(auth=github.Auth.Login(…))`` or ``github.Github(auth=github.Auth.Token(…))`` instead.
* The use of ``github.Github(password=…)`` is deprecated, use ``github.Github(auth=github.Auth.Login(…))`` instead.
* The use of ``github.Github(jwt=…)`` is deprecated, use ``github.Github(auth=github.AppAuth(…))`` or ``github.Github(auth=github.AppAuthToken(…))`` instead.
* The use of ``github.Github(app_auth=…)`` is deprecated, use ``github.Github(auth=github.Auth.AppInstallationAuth(…))`` instead.
* The use of ``github.GithubIntegration(integration_id=…, private_key=…, jwt_expiry=…, jwt_issued_at=…, jwt_algorithm=…)`` is deprecated, use ``github.GithubIntegration(auth=github.Auth.AppAuth(…))`` instead.
* The use of ``github.GithubIntegration.create_jwt`` is deprecated, use ``github.Github(auth=github.Auth.AppAuth)``, ``github.Auth.AppAuth.token`` or ``github.Auth.AppAuth.create_jwt(expiration)`` instead.
* The use of ``AppAuthentication`` is deprecated, use ``github.Auth.AppInstallationAuth`` instead.
* The use of ``github.Github.get_app()`` without providing argument ``slug`` is deprecated, use ``github.GithubIntegration(auth=github.Auth.AppAuth(…)).get_app()``.
Bug Fixes
^^^^^^^^^
* Test and fix UTC issue with AppInstallationAuth (`2561 <https://github.com/PyGithub/PyGithub/pull/2561>`_) (`ff3b80f8 <https://github.com/PyGithub/PyGithub/commit/ff3b80f8>`_)
* Make Requester.__createException robust against missing message and body (`2159 <https://github.com/PyGithub/PyGithub/pull/2159>`_) (`7be3f763 <https://github.com/PyGithub/PyGithub/commit/7be3f763>`_)
* Fix auth issues with `Installation.get_repos` (`2547 <https://github.com/PyGithub/PyGithub/pull/2547>`_) (`64075120 <https://github.com/PyGithub/PyGithub/commit/64075120>`_)
* Fix broken urls in docstrings (`2393 <https://github.com/PyGithub/PyGithub/pull/2393>`_) (`f82ad61c <https://github.com/PyGithub/PyGithub/commit/f82ad61c>`_)
* Raise error on unsupported redirects, log supported redirects (`2524 <https://github.com/PyGithub/PyGithub/pull/2524>`_) (`17cd0b79 <https://github.com/PyGithub/PyGithub/commit/17cd0b79>`_)
* Fix GithubIntegration that uses expiring jwt (`2460 <https://github.com/PyGithub/PyGithub/pull/2460>`_) (`5011548c <https://github.com/PyGithub/PyGithub/commit/5011548c>`_)
* Add expiration argument back to GithubIntegration.create_jwt (`2439 <https://github.com/PyGithub/PyGithub/pull/2439>`_) (`822fc05c <https://github.com/PyGithub/PyGithub/commit/822fc05c>`_)
* Add crypto extras to pyjwt, which pulls in cryptogaphy package (`2443 <https://github.com/PyGithub/PyGithub/pull/2443>`_) (`554b2b28 <https://github.com/PyGithub/PyGithub/commit/554b2b28>`_)
* Remove RLock from Requester (`2446 <https://github.com/PyGithub/PyGithub/pull/2446>`_) (`45f3d723 <https://github.com/PyGithub/PyGithub/commit/45f3d723>`_)
* Move CI to Python 3.11 release and 3.12 dev (`2434 <https://github.com/PyGithub/PyGithub/pull/2434>`_) (`e414c322 <https://github.com/PyGithub/PyGithub/commit/e414c322>`_)
* Pass Requester base URL to integration (`2420 <https://github.com/PyGithub/PyGithub/pull/2420>`_) (`bdceae2f <https://github.com/PyGithub/PyGithub/commit/bdceae2f>`_)
Improvements
^^^^^^^^^^^^
* Add Webhook Deliveries (`2508 <https://github.com/PyGithub/PyGithub/pull/2508>`_) (`517ad336 <https://github.com/PyGithub/PyGithub/commit/517ad336>`_)
* Add support for workflow jobs and steps (`1951 <https://github.com/PyGithub/PyGithub/pull/1951>`_) (`804c3107 <https://github.com/PyGithub/PyGithub/commit/804c3107>`_)
* Add support for get_app() with App authentication (`2549 <https://github.com/PyGithub/PyGithub/pull/2549>`_) (`6d4b6d14 <https://github.com/PyGithub/PyGithub/commit/6d4b6d14>`_)
* Allow multiline comments in PullRequest (`2540 <https://github.com/PyGithub/PyGithub/pull/2540>`_) (`6a21761e <https://github.com/PyGithub/PyGithub/commit/6a21761e>`_)
* Implement `AppUserAuth` for Github App user tokens (`2546 <https://github.com/PyGithub/PyGithub/pull/2546>`_) (`f291a368 <https://github.com/PyGithub/PyGithub/commit/f291a368>`_)
* Add support for environments (`2223 <https://github.com/PyGithub/PyGithub/pull/2223>`_) (`0384e2fd <https://github.com/PyGithub/PyGithub/commit/0384e2fd>`_)
* Add support for new RepositoryAdvisories API :tada: (`2483 <https://github.com/PyGithub/PyGithub/pull/2483>`_) (`daf62bd4 <https://github.com/PyGithub/PyGithub/commit/daf62bd4>`_)
* Make `MainClass.get_app` return completed `GithubApp` when slug is given (`2543 <https://github.com/PyGithub/PyGithub/pull/2543>`_) (`84912a67 <https://github.com/PyGithub/PyGithub/commit/84912a67>`_)
* Add authentication classes, move auth logic there (`2528 <https://github.com/PyGithub/PyGithub/pull/2528>`_) (`fc2d0e15 <https://github.com/PyGithub/PyGithub/commit/fc2d0e15>`_)
* Add sort order and direction for getting comments (`2544 <https://github.com/PyGithub/PyGithub/pull/2544>`_) (`a8e7c423 <https://github.com/PyGithub/PyGithub/commit/a8e7c423>`_)
* Add `name` filter to `Repository.get_artifacts()` (`2459 <https://github.com/PyGithub/PyGithub/pull/2459>`_) (`9f52e948 <https://github.com/PyGithub/PyGithub/commit/9f52e948>`_)
* Add `name`, `display_title` and `path` attributes to `WorkflowRun` (`2397 <https://github.com/PyGithub/PyGithub/pull/2397>`_) (`10816389 <https://github.com/PyGithub/PyGithub/commit/10816389>`_)
* Add new `create_fork` arguments (`2493 <https://github.com/PyGithub/PyGithub/pull/2493>`_) (`b94a83cb <https://github.com/PyGithub/PyGithub/commit/b94a83cb>`_)
* add `ref` to Deployment (`2489 <https://github.com/PyGithub/PyGithub/pull/2489>`_) (`e8075c41 <https://github.com/PyGithub/PyGithub/commit/e8075c41>`_)
* Add query `check_suite_id` integer to `Workflow.get_runs` (`2466 <https://github.com/PyGithub/PyGithub/pull/2466>`_) (`a4854519 <https://github.com/PyGithub/PyGithub/commit/a4854519>`_)
* Add `generate_release_notes` parameter to `create_git_release` and `create_git_tag_and_release` (`2417 <https://github.com/PyGithub/PyGithub/pull/2417>`_) (`49b3ae16 <https://github.com/PyGithub/PyGithub/commit/49b3ae16>`_)
* Add example for Pull Request comments to documentation (`2390 <https://github.com/PyGithub/PyGithub/pull/2390>`_) (`c2f12bdc <https://github.com/PyGithub/PyGithub/commit/c2f12bdc>`_)
* Add allow_auto_merge support to Repository (`2477 <https://github.com/PyGithub/PyGithub/pull/2477>`_) (`8c4b9465 <https://github.com/PyGithub/PyGithub/commit/8c4b9465>`_)
* Add `artifact_id` argument to `Repository.get_artifact()` (`2458 <https://github.com/PyGithub/PyGithub/pull/2458>`_) (`4fa0a5f3 <https://github.com/PyGithub/PyGithub/commit/4fa0a5f3>`_)
* Add missing attributes to Branch (`2512 <https://github.com/PyGithub/PyGithub/pull/2512>`_) (`e296dbdb <https://github.com/PyGithub/PyGithub/commit/e296dbdb>`_)
* Add allow_update_branch option to Organization (`2465 <https://github.com/PyGithub/PyGithub/pull/2465>`_) (`bab4180f <https://github.com/PyGithub/PyGithub/commit/bab4180f>`_)
* Add support for Issue.state_reason 2370 (`2392 <https://github.com/PyGithub/PyGithub/pull/2392>`_) (`5aa544a1 <https://github.com/PyGithub/PyGithub/commit/5aa544a1>`_)
* Add parameters to Repository.get_workflow_runs (`2408 <https://github.com/PyGithub/PyGithub/pull/2408>`_) (`4198dbfb <https://github.com/PyGithub/PyGithub/commit/4198dbfb>`_)
Maintenance
^^^^^^^^^^^
* Add type stub for MainClass.get_project_column (`2502 <https://github.com/PyGithub/PyGithub/pull/2502>`_) (`d514222c <https://github.com/PyGithub/PyGithub/commit/d514222c>`_)
* Sync GithubIntegration __init__ arguments with github.Github (`2556 <https://github.com/PyGithub/PyGithub/pull/2556>`_) (`ea45237d <https://github.com/PyGithub/PyGithub/commit/ea45237d>`_)
* Update MAINTAINERS (`2545 <https://github.com/PyGithub/PyGithub/pull/2545>`_) (`f4e9dcb3 <https://github.com/PyGithub/PyGithub/commit/f4e9dcb3>`_)
* Link to stable docs, update introduction in package used by pypi, move auth arg front (`2557 <https://github.com/PyGithub/PyGithub/pull/2557>`_) (`006766f9 <https://github.com/PyGithub/PyGithub/commit/006766f9>`_)
* Merge PaginatedList.pyi back to source (`2555 <https://github.com/PyGithub/PyGithub/pull/2555>`_) (`cb50dec5 <https://github.com/PyGithub/PyGithub/commit/cb50dec5>`_)
* Merge GithubObject.pyi/Requester.pyi stubs back to source (`2463 <https://github.com/PyGithub/PyGithub/pull/2463>`_) (`b6258f4b <https://github.com/PyGithub/PyGithub/commit/b6258f4b>`_)
* [CI] Moving linting into separate workflow (`2522 <https://github.com/PyGithub/PyGithub/pull/2522>`_) (`52fc1077 <https://github.com/PyGithub/PyGithub/commit/52fc1077>`_)
* Merging 1.58.x patch release notes into master (`2525 <https://github.com/PyGithub/PyGithub/pull/2525>`_) (`217d4241 <https://github.com/PyGithub/PyGithub/commit/217d4241>`_)
* Merge AppAuthentication.pyi to source (`2519 <https://github.com/PyGithub/PyGithub/pull/2519>`_) (`8e8cfb30 <https://github.com/PyGithub/PyGithub/commit/8e8cfb30>`_)
* Merge GithubException.pyi stubs back to source (`2464 <https://github.com/PyGithub/PyGithub/pull/2464>`_) (`03a2f696 <https://github.com/PyGithub/PyGithub/commit/03a2f696>`_)
* Add missing fields from `GithubCredentials.py` to CONTRIBUTING.md (`2482 <https://github.com/PyGithub/PyGithub/pull/2482>`_) (`297317ba <https://github.com/PyGithub/PyGithub/commit/297317ba>`_)
* Update docstring and typing for allow_forking and allow_update_branch (Repository) (`2529 <https://github.com/PyGithub/PyGithub/pull/2529>`_) (`600217f0 <https://github.com/PyGithub/PyGithub/commit/600217f0>`_)
* Bump actions/checkout from 2 to 3.1.0 (`2327 <https://github.com/PyGithub/PyGithub/pull/2327>`_) (`300c5015 <https://github.com/PyGithub/PyGithub/commit/300c5015>`_)
* RTD: install current project (`def5223c <https://github.com/PyGithub/PyGithub/commit/def5223c>`_)
* Add current dir sys.path as well (`9c96faa7 <https://github.com/PyGithub/PyGithub/commit/9c96faa7>`_)
* Use use_scm_version to get current version from git tag (`2429 <https://github.com/PyGithub/PyGithub/pull/2429>`_) (`3ea91a3a <https://github.com/PyGithub/PyGithub/commit/3ea91a3a>`_)