Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Repository class with API spec #3156

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test data
  • Loading branch information
EnricoMi committed Jan 8, 2025
commit ab2bd8e5a956e6c93b2a9acee95975b5d0f92c17
10 changes: 0 additions & 10 deletions tests/ReplayData/LazyRepository.setUp.txt

This file was deleted.

17 changes: 3 additions & 14 deletions tests/ReplayData/Repository.setUp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@ https
GET
api.github.com
None
/user
/repos/PyGithub/PyGithub
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4912'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"8d4bf64381cca7c6ba5753129f5fc552"'), ('date', 'Sun, 27 May 2012 07:17:08 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"type":"User","disk_usage":16976,"public_gists":3,"bio":"","blog":"http://vincent-jacques.net","url":"https://api.github.com/users/jacquev6","private_gists":5,"collaborators":0,"plan":{"private_repos":5,"collaborators":1,"name":"micro","space":614400},"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","company":"Criteo","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","email":"[email protected]","total_private_repos":5,"followers":13,"name":"Vincent Jacques","public_repos":11,"created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"owned_private_repos":5,"following":24,"html_url":"https://github.com/jacquev6","hireable":false, "use_squash_pr_title_as_default": true, "squash_merge_commit_title": "PR_TITLE", "squash_merge_commit_message": "COMMIT_MESSAGES", "merge_commit_title": "PR_TITLE", "merge_commit_message": "PR_BODY", "web_commit_signoff_required": true}

https
GET
api.github.com
None
/repos/jacquev6/PyGithub
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4911'), ('content-length', '1129'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1a93ec821b0bd7094340a9fc34017aa0"'), ('date', 'Sun, 27 May 2012 07:17:09 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"git_url":"git://github.com/jacquev6/PyGithub.git","deployments_url":"https://api.github.com/repos/jacquev6/PyGithub/deployments","releases_url":"https://api.github.com/repos/jacquev6/PyGithub/releases{/id}","updated_at":"2012-05-27T06:55:28Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_pages":false,"has_wiki":false,"has_issues":true,"fork":false,"forks":3,"size":308,"private":false,"open_issues":16,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"[email protected]:jacquev6/PyGithub.git","pushed_at":"2012-05-27T06:00:28Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub", "use_squash_pr_title_as_default": true, "squash_merge_commit_title": "PR_TITLE", "squash_merge_commit_message": "COMMIT_MESSAGES", "merge_commit_title": "PR_TITLE", "merge_commit_message": "PR_BODY", "web_commit_signoff_required": true, "license": {"key": "lgpl-3.0", "name": "GNU Lesser General Public License v3.0", "spdx_id": "LGPL-3.0", "url": "https://api.github.com/licenses/lgpl-3.0", "node_id": "MDc6TGljZW5zZTEy"},"custom_properties": {"foo": "bar"}, "has_discussions": false}
[('Date', 'Tue, 07 Jan 2025 07:32:15 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"37ea58577585c38f93634ef43114c657de2581286eb6976ec18c274de296eff0"'), ('Last-Modified', 'Mon, 06 Jan 2025 21:35:40 GMT'), ('X-OAuth-Scopes', 'read:discussion, repo'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2025-02-04 16:42:10 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4999'), ('X-RateLimit-Reset', '1736238735'), ('X-RateLimit-Used', '1'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('Transfer-Encoding', 'chunked'), ('Server', 'github.com'), ('X-GitHub-Request-Id', 'B6D4:4D93:FECF60:106E791:677CD87F')]
{"id":3544490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTQ0NDkw","name":"PyGithub","full_name":"PyGithub/PyGithub","private":false,"owner":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","user_view_type":"public","site_admin":false},"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2025-01-06T21:35:40Z","pushed_at":"2024-12-19T12:01:11Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"[email protected]:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"https://pygithub.readthedocs.io/","size":16425,"stargazers_count":7122,"watchers_count":7122,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":true,"forks_count":1793,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":357,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["github","github-api","pygithub","python"],"visibility":"public","forks":1793,"open_issues":357,"watchers":7122,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"","allow_squash_merge":true,"allow_merge_commit":false,"allow_rebase_merge":false,"allow_auto_merge":false,"delete_branch_on_merge":true,"allow_update_branch":true,"use_squash_pr_title_as_default":true,"squash_merge_commit_message":"PR_BODY","squash_merge_commit_title":"PR_TITLE","merge_commit_message":"PR_TITLE","merge_commit_title":"MERGE_MESSAGE","custom_properties":{},"organization":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","user_view_type":"public","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"enabled"},"secret_scanning_non_provider_patterns":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":1793,"subscribers_count":111}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https
PUT
api.github.com
None
/repos/jacquev6/PyGithub/collaborators/Lyloa
/repos/PyGithub/PyGithub/collaborators/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
{"permission": "custom_role"}
204
Expand Down
14 changes: 7 additions & 7 deletions tests/ReplayData/Repository.testAssignees.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ https
GET
api.github.com
None
/repos/jacquev6/PyGithub/assignees/jacquev6
/repos/PyGithub/PyGithub/assignees/jacquev6
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
204
Expand All @@ -35,7 +35,7 @@ https
GET
api.github.com
None
/repos/jacquev6/PyGithub/assignees/Lyloa
/repos/PyGithub/PyGithub/assignees/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
404
Expand All @@ -46,7 +46,7 @@ https
PUT
api.github.com
None
/repos/jacquev6/PyGithub/collaborators/Lyloa
/repos/PyGithub/PyGithub/collaborators/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
204
Expand All @@ -57,7 +57,7 @@ https
GET
api.github.com
None
/repos/jacquev6/PyGithub/assignees/Lyloa
/repos/PyGithub/PyGithub/assignees/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
204
Expand All @@ -68,7 +68,7 @@ https
GET
api.github.com
None
/repos/jacquev6/PyGithub/assignees
/repos/PyGithub/PyGithub/assignees
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
Expand All @@ -79,7 +79,7 @@ https
DELETE
api.github.com
None
/repos/jacquev6/PyGithub/collaborators/Lyloa
/repos/PyGithub/PyGithub/collaborators/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
204
Expand All @@ -90,7 +90,7 @@ https
GET
api.github.com
None
/repos/jacquev6/PyGithub/assignees/Lyloa
/repos/PyGithub/PyGithub/assignees/Lyloa
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
404
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ api.github.com
None
/hub
{'Content-Type': 'multipart/form-data; boundary=----------------------------3c3ba8b523b2', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.callback"http://requestb.in/1bc1sc61------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.topic"https://github.com/jacquev6/PyGithub/events/non-existing-event------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.mode"subscribe------------------------------3c3ba8b523b2--
------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.callback"http://requestb.in/1bc1sc61------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.topic"https://github.com/PyGithub/PyGithub/events/non-existing-event------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.mode"subscribe------------------------------3c3ba8b523b2--
422
[('status', '422 Unprocessable Entity'), ('content-length', '51'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-remaining', '4994'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Tue, 05 Feb 2013 18:58:01 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"message":"Invalid event: \"non-existing-event\""}
Loading