Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.57
->==2.5.0
Release Notes
pygithub/pygithub (PyGithub)
v2.5.0
Compare Source
Breaking Changes
github.Requester.Requester.graphql_named_mutation
have been renamed:variables
renamed tomutation_input
output
renamed tooutput_schema
output
has been removedNew features
RepositoryDiscussion
powered by GraphQL API @EnricoMi (#3048)Repository.get_discussion()
to get a single Discussion @tiangolo (#3072)Improvements
actor
property to WorkflowRun @gbhand (#2764)Bug Fixes
Maintenance
510c140
)0d395d4
)v2.4.0
Compare Source
New features
Improvements
has_discussions
toAuthenticatedUser
andRepository
classes @cwlls (#3020)SecurityAndAnalysis
attributes @squatched (#3025)dict
type toadd_attribute
script @jackylamhk (#2977)make_latest
toGitRelease.update_release
@treee111 (#2888)Bug Fixes
Maintenance
v2.3.0
Compare Source
New features
Improvements
name
andmessage
whengenerate_release_notes
is true @heitorpolidoro (#2868)WorkflowJob
@xvega (#2921)created
andcheck_suite_id
filter for Repository Workflow runs @treee111 (#2891)Bug Fixes
add_to_collaborators
@jodelasur (#2905)Maintenance
.swp
fils to.gitignore
@boomanaiden154 (#2903)CONTRIBUTING.md
@wakamex (#2900)pyproject.toml
@treee111 (#2894)v2.2.0
Compare Source
Breaking Changes
The
github.Comparison.Comparison
instance returned byRepository.compare
provides acommits
property that used to return alist[github.Commit.Commit]
, which has now been changed toPaginatedList[github.Commit.Commit]
. This breaks user code that assumes alist
:This will raise a
TypeError: object of type 'PaginatedList' has no len()
, as the returnedPaginatedList
does not support the
len()
method. Use thetotalCount
property instead:New features
Improvements
Repository.compare().commits
return paginated list by @EnricoMi in https://github.com/PyGithub/PyGithub/pull/2882include_all_branches
tocreate_repo_from_template
ofAuthenticatedUser
andOrganization
by @janssonoskar in https://github.com/PyGithub/PyGithub/pull/2871Organization.create_repo
by @tekumara in https://github.com/PyGithub/PyGithub/pull/2700Repository
collaborator permissions by @flying-sheep in https://github.com/PyGithub/PyGithub/pull/1996PullRequestReview.dismiss
by @ColasGael in https://github.com/PyGithub/PyGithub/pull/2854request_cve
onRepositoryAdvisories
by @JLLeitschuh in https://github.com/PyGithub/PyGithub/pull/2855GithubObject.last_modified_datetime
to havelast_modified
as adatetime
by @chouetz in https://github.com/PyGithub/PyGithub/pull/2772internal
as valid Repository visibility value by @AndrewJDawes in https://github.com/PyGithub/PyGithub/pull/2806Bug Fixes
Maintenance
Repository
by @trim21 in https://github.com/PyGithub/PyGithub/pull/2798Full Changelog: PyGithub/PyGithub@v2.1.1...v2.2.0
v2.1.1
Compare Source
Bug Fixes
001c085
)Maintenance
035c88f
)v2.1.0.post0
Compare Source
Important
Request throttling
This release introduces a default throttling mechanism to mitigate secondary rate limit errors and comply with Github's best practices:
https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28#dealing-with-secondary-rate-limits
The default throttling of 1 second between writes and 0.25 second between any requests can be configured
for
github.Github
andgithub.GithubIntegration
:Set these parameters to
None
to disable throttling and restore earlier behavior.Request retry
This release introduces a default retry mechanism to retry retry-able 403 responses (primary and secondary rate limit errors only) and any 5xx response.
Class
github.GithubRetry
implements this behavior, and can be configured via theretry
argument ofgithub.Github
andgithub.GithubIntegration
.Retry behavior is configured similar to
urllib3.Retry
: https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.htmlSet this parameter to
None
to disable retry mechanism and restore earlier behaviour.Breaking Changes
Timestamps
Any timestamps returned by this library are
datetime
with timezone information, usually UTC.Before this release, timestamps used to be naive
datetime
instances without timezone.Comparing (other than
==
) these timestamps with naivedatetime
instances used to work but will now break.Add a timezone information to your
datetime
instances before comparison:Netrc authentication
A Netrc file (e.g.
~/.netrc
) does not override PyGithub authentication, anymore.If you require authentication through Netrc, then this is a breaking change.
Use a
github.Auth.NetrcAuth
instance to use Netrc credentials:Repository.create_pull
Merged overloaded
create_pull
methodsinto
Please update your usage of
Repository.create_pull
accordingly.New features
9915580
)0bb72ca
)73236e2
)Improvements
0177f7c
)Branch.edit_*
functions return objects (#2748) (8dee53a
)license
attribute toRepository
(#2721) (26d353e
)Repository
(#2742) (65cfeb1
)is_alphanumeric
attribute toAutolink
andRepository.create_autolink
(#2630) (b6a28a2
)requests
fallback to netrc, providegithub.Auth.Netrc
(#2739) (ac36f6a
)AppInstallationAuth.__integration
(#2695) (8bf542a
)a7bfdf2
)eadc241
)Secret
andVariable
classes (#2623) (bcca758
)aedfa0b
)required_linear_history
attribute toBranchProtection
(#2643) (7a80fad
)GithubException
, don't log it (#2611) (de80ff4
)message
property toGithubException
(#2591) (f087cad
)91b3f40
)Workflow.get_runs()
(#2346) (766df99
)github.Rate.used
field (#2531) (c4c2e52
)Bug Fixes
Branch.bypass_pull_request_allowances
failing with "nil is not an object" (#2535) (c5542a6
)required_conversation_resolution
assertion (#2715) (54f2226
)2fa568b
)responseHeaders
toint
(#2697) (adbfce9
)subject_type
in creating pull request review comment (#2642) (4933459
)GithubRetry.py
(#2610) (950a694
)Branch.bypass_pull_request_allowances
failing with "nil is not an object" (#2535) (c5542a6
)Maintenance
.pyi
type stubs back to.py
sources (#2636)e66c163
)094538e
)6d871d5
)a91debf
)9a88b6b
)95d8b83
)2cc1ba2
)add_attribute.py
to latest conding style (#2631) (e735972
)48d2009
)ff0f31c
)flake8
withruff
(#2617) (42c3b47
)c5c83eb
)1d637e4
)2edc0f8
)disallow_untyped_defs
(#2609) (294c0cc
)check_untyped_defs
(#2607) (8816889
)13e178a
)3c880e7
)typing_extensions
forTypedDict
(#2592) (5fcb0c7
)2e5cd31
)72840de
)7324110
)flake8
as last (#2595) (11bb6bd
)5c60089
)8d3b905
)v1.59.1
Compare Source
Bug Fixes
adbfce9
)v1.59.0
Compare Source
Important
This release introduces new way of authentication. All authentication-related arguments
github.Github(login_or_token=…, password=…, jwt=…, app_auth=…)
andgithub.GithubIntegration(integration_id=…, private_key=…, jwt_expiry=…, jwt_issued_at=…, jwt_algorithm=…)
are replaced by a singleauth=…
argument. Modulegithub.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
position
argument ingithub.PullRequest.create_review_comment(position=…)
has been renamed toline
.This breaks user code that calls
create_review_comment
with keyword argumentposition
. Call withline=…
instead.Calling this method with positional arguments is not breaking.
jwt_expiry
,jwt_issued_at
andjwt_algorithm
arguments ingithub.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=…)
.since
argument ingithub.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=…)`.Deprecations
github.Github(login_or_token=…)
is deprecated, usegithub.Github(auth=github.Auth.Login(…))
orgithub.Github(auth=github.Auth.Token(…))
instead.github.Github(password=…)
is deprecated, usegithub.Github(auth=github.Auth.Login(…))
instead.github.Github(jwt=…)
is deprecated, usegithub.Github(auth=github.AppAuth(…))
orgithub.Github(auth=github.AppAuthToken(…))
instead.github.Github(app_auth=…)
is deprecated, usegithub.Github(auth=github.Auth.AppInstallationAuth(…))
instead.github.GithubIntegration(integration_id=…, private_key=…, jwt_expiry=…, jwt_issued_at=…, jwt_algorithm=…)
is deprecated, usegithub.GithubIntegration(auth=github.Auth.AppAuth(…))
instead.github.GithubIntegration.create_jwt
is deprecated, usegithub.Github(auth=github.Auth.AppAuth)
,github.Auth.AppAuth.token
orgithub.Auth.AppAuth.create_jwt(expiration)
instead.AppAuthentication
is deprecated, usegithub.Auth.AppInstallationAuth
instead.github.Github.get_app()
without providing argumentslug
is deprecated, usegithub.GithubIntegration(auth=github.Auth.AppAuth(…)).get_app()
.Bug Fixes
ff3b80f
)7be3f76
)Installation.get_repos
(#2547) (6407512
)f82ad61
)17cd0b7
)5011548
)822fc05
)554b2b2
)45f3d72
)e414c32
)bdceae2
)Improvements
517ad33
)804c310
)6d4b6d1
)6a21761
)AppUserAuth
for Github App user tokens (#2546) (f291a36
)0384e2f
)daf62bd
)MainClass.get_app
return completedGithubApp
when slug is given (#2543) (84912a6
)fc2d0e1
)a8e7c42
)name
filter toRepository.get_artifacts()
(#2459) (9f52e94
)name
,display_title
andpath
attributes toWorkflowRun
(#2397) (1081638
)create_fork
arguments (#2493) (b94a83c
)ref
to Deployment (#2489) (e8075c4
)check_suite_id
integer toWorkflow.get_runs
(#2466) (a485451
)generate_release_notes
parameter tocreate_git_release
andcreate_git_tag_and_release
(#2417) (49b3ae1
)c2f12bd
)8c4b946
)artifact_id
argument toRepository.get_artifact()
(#2458) (4fa0a5f
)e296dbd
)bab4180
)5aa544a
)4198dbf
)Maintenance
d514222
)ea45237
)f4e9dcb
)006766f
)cb50dec
)b6258f4
)52fc107
)217d424
)8e8cfb3
)03a2f69
)GithubCredentials.py
to CONTRIBUTING.md (#2482) (297317b
)600217f
)300c501
)def5223
)9c96faa
)3ea91a3
)v1.58.2
Compare Source
Fixes
v1.58.1
Compare Source
Changes
Bug Fixes
v1.58.0
Compare Source
Bug Fixes & Improvements
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.