Releases: PyGithub/PyGithub
Releases · PyGithub/PyGithub
v2.8.1
v2.8.0
What's Changed
New Features
- Add self hosted runner management to Organization by @billnapier in #3203
- Add support to generate release notes by @mball-agathos in #3022
Improvements
- Fix connection pooling to improve connection performance by @chriskuehl in #3289
- Add
Repository.get_automated_security_fixesmethod by @zstyblik in #3303 - Sync
Issueclass with API spec by @EnricoMi in #3338 - Return more union classes like
NamedUser | Organization | Enterpriseby @EnricoMi in #3224 - Sync
Enterpriseclass with API spec by @EnricoMi in #3342 - Sync
GitReleaseAssetclass with API spec by @EnricoMi in #3343 - Sync many class with OpenAPI spec by @EnricoMi in #3344
- Point deprecation warnings to the caller code rather than inner class by @xmo-odoo in #3275
- Allow for repo strings in all
Teamrepo methods by @EnricoMi in #3356
Bug Fixes
- Fix API path of
Repository.get_git_refby @csalerno-asml in #2992 - Rework redirection URL allowance check by @EnricoMi in #3329
- Fix
GitRelease.name, deprecateGitRelease.titleby @EnricoMi in #3346 - Remove
"COMMENT"as the default event forcreate_reviewby @eddie-santos in #3078 - Add support for public release assets by @aolieman in #3339
- Fix GitHub breaking API change of
maintainersinOrganization.create_teamby @interifter in #3291
Maintenance
- Minor fix to release.yml by @EnricoMi in #3201
- Reduce test replay data by @EnricoMi in #3243
- Add check to OpenAPI script to check doc-string verbs by @EnricoMi in #3332
- Improve apply OpenAPI schemas by @EnricoMi in #3333
- Add config to OpenAPI script to ignore schemas by @EnricoMi in #3334
- Add suggest and create method feature to OpenAPI script by @EnricoMi in #3318
- Fix CI OpenApi apply command by @EnricoMi in #3341
- Improve OpenAPI scripts by @EnricoMi in #3340
- Improve OpenAPI CI by @EnricoMi in #3347
- Rework test framework by @EnricoMi in #3271
- Some minor fixes to OpenAPI scripts by @EnricoMi in #3350
- Add manual workflow to fix auto-fixable issues by @EnricoMi in #3351
- Bump actions/download-artifact from 4 to 5 by @dependabot[bot] in #3330
- Use default per-page const in
PaginatedListby @sam93210 in #3039 - Bump actions/setup-python from 4 to 5 by @dependabot[bot] in #3283
- Bump actions/checkout from 3 to 5 by @dependabot[bot] in #3348
- Various minor OpenAPI scripts fixes by @EnricoMi in #3353
- Add union class support to OpenAPI script by @EnricoMi in #3354
- Add
github_actionslabel to Maintenance section by @EnricoMi in #3357 - Upgrade docformatter pre-commit hook by @EnricoMi in #3359
- Add warning about Checks API in doc-strings by @atodorov in #3229
- Update docs on development by @EnricoMi in #3352
New Contributors
- @chriskuehl made their first contribution in #3289
- @zstyblik made their first contribution in #3303
- @csalerno-asml made their first contribution in #2992
- @eddie-santos made their first contribution in #3078
- @aolieman made their first contribution in #3339
- @sam93210 made their first contribution in #3039
- @mball-agathos made their first contribution in #3022
- @atodorov made their first contribution in #3229
- @interifter made their first contribution in #3291
Full Changelog: v2.7.0...v2.8.0
v2.7.0
What's Changed
Breaking Changes
- Method
Github.get_rate_limit()now returnsRateLimitOverviewrather thanRateLimit(#3205).
Code like
gh.get_rate_limit().core.remainingshould be replaced with
gh.get_rate_limit().resources.core.remaining- Method
GitTag.verificationnow returnsGitCommitVerificationrather thandict[str, Any](#3226).
Code like
tag.verification["reason"]
tag.verification.get("reason")should be replaced with
tag.verification.reasonNew Features
- Add getting list of self-hosted runners of organization by @climbfuji in #3190
- Apply OpenAPI spec by @EnricoMi in #3317
- Add support for Sub-Issues by @e7217 in #3258
Improvements
- Refactor search results into separate classes by @EnricoMi in #3204
- Add
OrganizationInvitationby @EnricoMi in #3207 - Add and apply missing schemas by @EnricoMi in #3209
- Sync
RepositoryAdvisorytests with OpenAPI spec by @EnricoMi in #3215 - Sync
ProjectColumnandProjectCardtests with OpenAPI spec by @EnricoMi in #3216 - Sync
CopilotSeatclass with API spec by @EnricoMi in #3232 - Sync
HookDeliverySummaryclass with API spec by @EnricoMi in #3233 - Sync
RequiredPullRequestReviewsclass with API spec by @EnricoMi in #3234 - Sync
RequiredStatusChecksclass with API spec by @EnricoMi in #3236 - Sync
Teamclass with API spec by @EnricoMi in #3237 - Replace
deprecated.deprecated()withtyping_extensions.deprecated()by @lazka in #3255 - fix(CodeScanAlert): add missing attributes by @ReenigneArcher in #3274
- Allow SHAs when creating PR comments by @tuchfarber in #3248
- Get collaborator role name by @jmgate in #3295
- Adding
prevent_self_reviewproperty toRepository.createEnvironmentby @gopidesupavan in #3246 - Add
PullRequest.get_issue_timelinemethod by @kukarkinmm in #3259 - Support built-in
reversed()onPaginatedListby @mfocko in #3260 - Relax 404 condition in
Requesterexception handling by @jsmolar in #3299 - Add
delete_self_hosted_runnertoOrganizationby @uncleDecart in #3306
Bug Fixes
- Fix broken pickle support for
Authclasses by @EnricoMi in #3211 - Remove schema from
Deployment, removemessageattribute by @EnricoMi in #3223 - Fix incorrect deprecated import by @EnricoMi in #3225
- Add
CodeSecurityConfigRepositoryreturned byget_repos_for_code_security_configby @EnricoMi in #3219 - Fix
Branch.get_required_status_checksreturn type by @EnricoMi in #3235 - Adds
multi_selectandtrue_falseoptions toCustomProperty.value_typeby @gfog-floqast in #3173 - Fix url encoding of strings with slashes in URLs by @OscarVanL in #3263
- Fix side-effect when removing Authorization key from headers by @alecglen in #3313
- Make
TimingData.run_duration_msoptional by @LifeLex in #3268 - Normalize App ID to String & Enhance JWT Issuer Verification by @x612skm in #3272
Dependencies
- Bump actions/checkout from 3 to 4 by @dependabot[bot] in #2754
Maintenance
- Mention removal of
AppAuth.private_keyin changelog by @EnricoMi in #3212 - Remove wrong schema from Repository by @EnricoMi in #3220
- Rename
HookDeliveryRequestand…Responseprivate headers fields by @EnricoMi in #3221 - Sort classes' functions by @EnricoMi in #3231
- Move all Python files to future annotations by @EnricoMi in #3241
- Fix return type of
PaginatedList[int]by @EnricoMi in #3240 - Sync with OpenAPI spec by @EnricoMi in #3244
- Make token auth default in tests by @EnricoMi in #3242
- Add
Organization.get_repos_for_code_security_configtest by @billnapier in #3239 - Add Python 3.13 to CI by @lazka in #3253
- Enhance PyGithub webhook documentation by @ssganesh035 in #3267
- Create codeql.yml by @JLLeitschuh in #3277
- Add schema to
TimingDataby @EnricoMi in #3206 - Remove error schemas from classes by @EnricoMi in #3202
New Contributors
- @ssganesh035 made their first contribution in #3267
- @ReenigneArcher made their first contribution in #3274
- @climbfuji made their first contribution in #3190
- @tuchfarber made their first contribution in #3248
- @jmgate made their first contribution in #3295
- @gopidesupavan made their first contribution in #3246
- @kukarkinmm made their first contribution in #3259
- @mfocko made their first contribution in #3260
- @gfog-floqast made their first contribution in #3173
- @jsmolar made their first contribution in #3299
- @OscarVanL made their first contribution in #3263
- @alecglen made their first contribution in #3313
- @LifeLex made their first contribution in #3268
- @e7217 made their first contribution in #3258
- @x612skm made their first contribution in #3272
- @uncleDecart made their first contribution in #3306
Full Changelog: v2.6.0...v2.7.0
v2.6.1
Bug Fixes
- Fix broken pickle support for
Authclasses by @EnricoMi in #3211 - Remove schema from
Deployment, removemessageattribute by @EnricoMi in #3223 - Fix incorrect deprecated import by @EnricoMi in #3225
- Add
CodeSecurityConfigRepositoryreturned byget_repos_for_code_security_configby @EnricoMi in #3219 - Make
GitTag.verificationreturnGitCommitVerificationby @EnricoMi in #3226
Maintenance
Full Changelog: v2.6.0...v2.6.1
v2.6.0
Breaking Changes
- Rework
ViewsandClonesby @EnricoMi in #3168:
View and clones traffic information returned byRepository.get_views_trafficandRepository.get_clones_traffic
now return proper PyGithub objects, instead of adict, with all information that used to be provided by thedict:
Code like
repo.get_views_traffic().["views"].timestamp
repo.get_clones_traffic().["clones"].timestampshould be replaced with
repo.get_views_traffic().views.timestamp
repo.get_clones_traffic().clones.timestamp- Fix typos by @kianmeng in #3086:
PropertyOrganizationCustomProperty.respository_idrenamed toOrganizationCustomProperty.repository_id.
New Features
- Add capability for global laziness by @EnricoMi in #2746
- Add Support for GitHub Copilot Seat Management in Organizations by @pashafateev in #3082
- Get branches where commit is head by @EnricoMi in #3083
- Support downloading a Release Asset by @neel-m in #3060
- Add
Repository.merge_upstreammethod by @Felixoid in #3175 - Support updating pull request draft status by @didot in #3104
- Add transfer ownership method to Repository by @tanannie22 in #3091
- Add enable and disable a Workflow by @nickrmcclorey in #3088
- Add support for managing Code Security Configrations by @billnapier in #3095
- Allow for private_key / sign function in AppAuth by @EnricoMi in #3065
Improvements
- Update RateLimit object with all the new categories GitHub added. by @billnapier in #3096
- Add support for make-latest to create_git_release and create_git_tag_and_release by @SebastienSyd in #3067
- Add branch protection support for
required_status_checks.checksobject by @treee111 in #2884 - Use id and tree_id from simple-commit to populate GitCommit.sha and GitCommit.tree by @EnricoMi in #3167
- Use message of response in GithubException by @EnricoMi in #3185
- Sync Advisory classes with API spec by @EnricoMi in #3193
- Sync Branch class with API spec by @EnricoMi in #3109
- Sync BranchProtection class with API spec by @EnricoMi in #3110
- Sync CheckRunAnnotation class with API spec by @EnricoMi in #3112
- Sync CheckRun class with API spec by @EnricoMi in #3111
- Sync CheckSuite class with API spec by @EnricoMi in #3113
- Sync Commit class with API spec by @EnricoMi in #3116
- Sync CommitComment class with API spec by @EnricoMi in #3117
- Sync CommitStatus class with API spec by @EnricoMi in #3118
- Sync ContentFile class with API spec by @EnricoMi in #3119
- Sync DependabotAlert class with API spec by @EnricoMi in #3120
- Sync Deployment class with API spec by @EnricoMi in #3121
- Sync DeploymentStatus class with API spec by @EnricoMi in #3122
- Sync Gist class with API spec by @EnricoMi in #3123
- Sync GistComment class with API spec by @EnricoMi in #3124
- Sync GitBlob class with API spec by @EnricoMi in #3125
- Sync GitCommit class with API spec by @EnricoMi in #3126
- Sync GithubApp class with API spec by @EnricoMi in #3127
- Sync GitRef class with API spec by @EnricoMi in #3128
- Sync GitReleaseAsset class with API spec by @EnricoMi in #3130
- Sync GitRelease class with API spec by @EnricoMi in #3129
- Sync GitTag class with API spec by @EnricoMi in #3131
- Sync GitTree class with API spec by @EnricoMi in #3132
- Sync Hook class with API spec by @EnricoMi in #3133
- Sync HookDelivery class with API spec by @EnricoMi in #3134
- Sync InstallationAuthorization class with API spec by @EnricoMi in #3136
- Sync Installation class with API spec by @EnricoMi in #3135
- Sync Invitation class with API spec by @EnricoMi in #3139
- Sync Issue class with API spec by @EnricoMi in #3140
- Sync IssueComment class with API spec by @EnricoMi in #3141
- Sync IssueEvent class with API spec by @EnricoMi in #3142
- Sync IssuePullRequest class with API spec by @EnricoMi in #3143
- Sync Label class with API spec by @EnricoMi in #3144
- Sync License class with API spec by @EnricoMi in #3145
- Sync Membership class with API spec by @EnricoMi in #3146
- Sync Migration class with API spec by @EnricoMi in #3147
- Sync Milestone class with API spec by @EnricoMi in #3148
- Sync NamedUser class with API spec by @EnricoMi in #3149
- Sync Organization class with API spec by @EnricoMi in #3150
- Sync OrganizationCustomProperty class with API spec by @EnricoMi in #3151
- Sync Project class with API spec by @EnricoMi in #3194
- Sync PublicKey class with API spec by @EnricoMi in #3152
- Sync PullRequest class with API spec by @EnricoMi in #3153
- Sync PullRequestComment class with API spec by @EnricoMi in #3154
- Sync RateLimit class with API spec by @EnricoMi in #3155
- Sync Repository class with API spec by @EnricoMi in #3156
- Sync RepositoryKey class with API spec by @EnricoMi in #3157
- Sync SecurityAndAnalysis class with API spec by @EnricoMi in #3158
- Sync SelfHostedActionsRunner class with API spec by @EnricoMi in #3159
- Sync SourceImport class with API spec by @EnricoMi in #3160
- Sync Tag class with API spec by @EnricoMi in #3161
- Sync Team class with API spec by @EnricoMi in #3162
- Sync Topic class with API spec by @EnricoMi in #3163
- Sync UserKey class with API spec by @EnricoMi in #3164
- Sync Workflow class with API spec by @EnricoMi in #3165
- Sync WorkflowRun class with API spec by @EnricoMi in #3166
Bug Fixes
- Patch httpretty socket for latest urllib3 release by @EnricoMi in #3102
- Fix API break when contents not found by @skinitimski in #3181
- Change
start_sideargument ofPullRequest.create_review_commentfrominttostrby @ryanpeach in #3170 - Create Review Request - transform string params to a list by @a-sido in #3099
- Fix
Repository.get_contentsredirection by @EnricoMi in #3183
Others
- Make
conclusionnullable inWorkflowJob.pyby @Apakottur in #3171 - Rename
Github.get_organizationargumentlogintoorgby @blyedev in #3187 - Make
NotSetanAttribute[Any]by @EnricoMi in #3057
Maintenance
- Sort attributes and properties in GitHub classes by @EnricoMi in #3105
- Preparations for maintaining Github classes by code by @EnricoMi in #3106
- Annotate Github classes with API schemas by @EnricoMi in #3107
- Make Pickle test use recorded data by @EnricoMi in #3137
- Add tests for file and stream downloads by @EnricoMi in #3182
- Use
responsesinstead ofhttprettyin tests by @majamassarini in https://gith...
v2.5.0
Breaking Changes
- Parameters of method
github.Requester.Requester.graphql_named_mutationhave been renamed:- Parameter
variablesrenamed tomutation_input - Parameter
outputrenamed tooutput_schema - Default value of parameter
outputhas been removed
- Parameter
New features
- Rework GraphQL mutations @EnricoMi (#3046)
- Make pagination work with GraphQL response data @EnricoMi (#3047)
- Add
RepositoryDiscussionpowered by GraphQL API @EnricoMi (#3048) - Add
Repository.get_discussion()to get a single Discussion @tiangolo (#3072)
Improvements
- Adds List organization memberships for the authenticated user @eduramirezh (#3040)
- Add
actorproperty to WorkflowRun @gbhand (#2764) - Make requester a public attribute @minrk (#3056)
Bug Fixes
- Fix requesting urls containing parameters with parameters dict @EnricoMi (#2929)
- PullRequest.delete_branch: fix the remaining pull requests check @fetsko (#3063)
Maintenance
- Remove stale bot @EnricoMi (510c140)
- Upgrade Github actions @EnricoMi (#3075)
- Add top issues dashboard action @EnricoMi (#3049)
- Make tests pass some more years @bmwiedemann (#3045)
- Run top issues workflow only in PyGithub repo @EnricoMi (0d395d4)
- Replace pre-commit action in order to pin pre-commit @minrk (#3059)
v2.4.0
New features
Improvements
- Add
has_discussionstoAuthenticatedUserandRepositoryclasses @cwlls (#3020) - Update more
SecurityAndAnalysisattributes @squatched (#3025) - Implement support for re-running only failed workflow jobs. @chrisgavin (#2983)
- Add possibility to mark a thread/notification as done @m42e (#2985)
- Add "pull_request_review_id" to PullRequestComment object @stroebs (#3000)
- Add minimize and unminimize functions for IssueComment class @arash77 (#3005)
- Support Organization/Repository custom properties @jackylamhk (#2968)
- Add
dicttype toadd_attributescript @jackylamhk (#2977) - Allow for deleting and restoring branch associated with PR @austinsasko (#1784)
- Add "archived_at" to Organization object. @billnapier (#2974)
- Adds Security & Analysis To Repository @squatched (#2960)
- Add added_by and last_used attributes to RepositoryKey @ramiro (#2952)
- Add
make_latesttoGitRelease.update_release@treee111 (#2888) - Make Commit.files return PaginatedList @iarspider (#2939)
Bug Fixes
Maintenance
v2.3.0
New features
- Support oauth for enterprise @EnricoMi (#2780)
- Support creation of Dependabot Organization and Repository Secrets @thomascrowley (#2874)
Improvements
- Create release with optional
nameandmessagewhengenerate_release_notesis true @heitorpolidoro (#2868) - Add missing attributes to
WorkflowJob@xvega (#2921) - Add
createdandcheck_suite_idfilter for Repository Workflow runs @treee111 (#2891) - Assert requester argument type in Auth @EnricoMi (#2912)
Bug Fixes
- Revert having allowed values for
add_to_collaborators@jodelasur (#2905)
Maintenance
- Fix imports in authentication docs @wurstbrot (#2923)
- CI: add docformatter to precommit @Borda (#2614)
- Add
.swpfils to.gitignore@boomanaiden154 (#2903) - Fix instructions building docs in
CONTRIBUTING.md@wakamex (#2900) - Explicitly name the modules built in
pyproject.toml@treee111 (#2894)
v2.2.0
Breaking Changes
The github.Comparison.Comparison instance returned by Repository.compare provides a commits property that used to return a list[github.Commit.Commit], which has now been changed to PaginatedList[github.Commit.Commit]. This breaks user code that assumes a list:
commits = repo.compare("v0.6", "v0.7").commits
no_of_commits = len(commits) # will raise a TypeErrorThis will raise a TypeError: object of type 'PaginatedList' has no len(), as the returned PaginatedList
does not support the len() method. Use the totalCount property instead:
commits = repo.compare("v0.6", "v0.7").commits
no_of_commits = commits.totalCountNew features
- Add support to call GraphQL API
Improvements
- Add parent_team_id, maintainers and notification_setting for creating and updating teams. by @Cheshirez in #2863
- Add support for issue reactions summary by @smuzaffar in #2866
- Support for DependabotAlert APIs by @coopernetes in #2879
- Derive GraphQL URL from base_url by @EnricoMi in #2880
- Make
Repository.compare().commitsreturn paginated list by @EnricoMi in #2882 - Add missing branch protection fields by @treee111 in #2873
- Add
include_all_branchestocreate_repo_from_templateofAuthenticatedUserandOrganizationby @janssonoskar in #2871 - Add and update organisation dependabot secrets by @mohy01 in #2316
- Add missing params to
Organization.create_repoby @tekumara in #2700 - Update allowed values for
Repositorycollaborator permissions by @flying-sheep in #1996 - Support editing PullRequestReview by @ColasGael in #2851
- Update attributes after calling
PullRequestReview.dismissby @ColasGael in #2854 - Add
request_cveonRepositoryAdvisoriesby @JLLeitschuh in #2855 - Filter collaborators of a repository by permissions by @notmicaelfilipe in #2792
- Set pull request to auto merge via GraphQL API by @heitorpolidoro in #2816
- Support Environment Variables and Secrets by @AndrewJDawes in #2848
- Update workflow.get_runs & pullrequest.add_to_assignees function signature by @sd-kialo in #2799
- Add
GithubObject.last_modified_datetimeto havelast_modifiedas adatetimeby @chouetz in #2772 - Add support for global advisories and unify some shared logic with repository advisories by @crimsonknave in #2702
- Add
internalas valid Repository visibility value by @AndrewJDawes in #2806 - Add support for issue comments reactions summary by @smuzaffar in #2813
Bug Fixes
- Add a bunch of missing urllib.parse.quote calls by @ExplodingCabbage in #1976
- Fix Variable and Secret url bugs by @AndrewJDawes in #2835
Maintenance
- Update the class name for NetrcAuth in the examples by @vinnybod in #2860
- Move build to PEP517 by @trim21 in #2800
- Use new type assert functions in
Repositoryby @trim21 in #2798 - PyTest: Move config to pyproject.toml by @Borda in #2859
- codespell: ignore-words-list by @Borda in #2858
- Improve fix-headers.py script by @EnricoMi in #2728
- Remove dependency on python-dateutil by @lazka in #2804
- CI: update precommit & apply by @Borda in #2600
- Docs: Fix parameter order according to Version 2.1.0 by @nad182 in #2786
- Add missing GitHub classes to docs by @EnricoMi in #2783
- CI: Fix mypy error by ignoring override by @EnricoMi in #2779
Full Changelog: v2.1.1...v2.2.0