├── github └── py.typed ├── requirements ├── docs.txt ├── types.txt └── test.txt ├── doc ├── github.rst ├── github_integration.rst ├── index.rst ├── reference.rst ├── examples.rst ├── examples │ ├── Commit.rst │ ├── Milestone.rst │ └── Branch.rst └── utilities.rst ├── .github ├── FUNDING.yml ├── dependabot.yml ├── workflows │ ├── pypi-release.yml │ ├── _build-pkg.yml │ └── lint.yml └── release-drafter.yml ├── codecov.yml ├── tests └── ReplayData │ ├── Requester.testBaseUrlHostRedirection.txt │ ├── Requester.testBaseUrlSchemeRedirection.txt │ ├── Requester.testBaseUrlPortRedirection.txt │ ├── Team.testDelete.txt │ ├── UserKey.testDelete.txt │ ├── Authorization.testDelete.txt │ ├── GistComment.testDelete.txt │ ├── Hook.testDelete.txt │ ├── Hook.testPing.txt │ ├── Hook.testTest.txt │ ├── Label.testDelete.txt │ ├── Download.testDelete.txt │ ├── Milestone.testDelete.txt │ ├── CommitComment.testDelete.txt │ ├── SpecificExceptions.testBadUserAgent.txt │ ├── IssueComment.testDelete.txt │ ├── PullRequestComment.testDelete.txt │ ├── GitRef.testDelete.txt │ ├── Exceptions.testBadAuthentication.txt │ ├── SpecificExceptions.testBadCredentials.txt │ ├── Authentication.testAuthorizationHeaderWithLogin.txt │ ├── Authentication.testAuthorizationHeaderWithToken.txt │ ├── PaginatedList.testNoFirstPage.txt │ ├── Exceptions.testUnknownUser.txt │ ├── Repository.testGetLanguages.txt │ ├── Exceptions.testNonJsonDataReturnedByGithub.txt │ ├── Issue134.testGetAuthorizationsFailsWhenAutenticatedThroughOAuth.txt │ ├── Organization.testGetTeamBySlug.txt │ ├── Repository.testMergeWithNothingToDo.txt │ ├── Organization.testGetTeams.txt │ ├── AuthenticatedUser.testGetNotificationsWithOtherArguments.txt │ ├── Repository.testMergeWithConflict.txt │ ├── Team.testEditWithoutArguments.txt │ ├── PullRequest.testGetLabels.txt │ ├── Markdown.testRenderMarkdown.txt │ ├── Repository.testCollaboratorPermissionNoPushAccess.txt │ ├── AuthenticatedUser.testGetOrgs.txt │ ├── NamedUser.testGetOrgs.txt │ ├── Team.testGetTeams.txt │ ├── Milestone.testGetLabels.txt │ ├── Repository.testGetLabel.txt │ ├── Organization.testCreateTeam.txt │ ├── Organization.testGetHookDeliveries.txt │ ├── Organization.testGetSecrets.txt │ ├── Repository.testGetDownloads.txt │ ├── Repository.testGetHookDeliveries.txt │ ├── Exceptions.testInvalidInput.txt │ ├── Organization.testGetHooks.txt │ ├── Organization.testGetVariables.txt │ ├── Organization.testGetDependabotSecrets.txt │ ├── Organization.testGetHook.txt │ ├── Repository.testGetHooks.txt │ ├── Authorization.setUp.txt │ ├── Markdown.testRenderGithubFlavoredMarkdown.txt │ ├── Organization.testGetPublicMembers.txt │ ├── Organization.testInviteUserAsNonOwner.txt │ ├── Repository.testGetContributors.txt │ ├── Issue.testGetLabels.txt │ ├── Repository.testCreateGitBlob.txt │ ├── AuthenticatedUser.testGetAuthorizations.txt │ ├── Label.testEdit.txt │ ├── Organization.testGetIssues.txt │ ├── Issue50.testGetLabel.txt │ ├── Hook.testEditWithMinimalParameters.txt │ ├── GitRef.testEdit.txt │ ├── AuthenticatedUser.testCreateAuthorizationWithoutArguments.txt │ ├── GitRef.testEditWithForce.txt │ ├── Organization.testGetHookDelivery.txt │ ├── ConditionalRequestUpdate.testDidNotUpdate.txt │ ├── Repository.testGetHookDelivery.txt │ ├── Repository.testUnsubscribePubSubHubbub.txt │ ├── AuthenticatedUser.testGetNotification.txt │ ├── Github.testSearchUserByEmail.txt │ ├── AuthenticatedUser.testGetNotifications.txt │ ├── Organization.testCreateHookWithMinimalParameters.txt │ ├── UserKey.setUp.txt │ ├── Repository.testCreateHookWithMinimalParameters.txt │ ├── Repository.testGetKeys.txt │ ├── Organization.testCreateHookWithAllParameters.txt │ ├── Search.testSearchReposWithNoResults.txt │ ├── Repository.testCreateHookWithAllParameters.txt │ ├── Repository.testGetGitRef.txt │ ├── GistComment.testEdit.txt │ ├── Issue50.testCreateLabel.txt │ ├── Repository.testGetGitRefWithIssue102Reverted.txt │ ├── Repository.testSubscribePubSubHubbub.txt │ ├── Authentication.testNoAuthentication.txt │ ├── Repository.testCreateGitRef.txt │ ├── AuthenticatedUser.testAcceptInvitation.txt │ ├── Issue50.testIssueGetLabels.txt │ ├── IssueComment.testEdit.txt │ ├── Repository.testCreateLabel.txt │ ├── AuthenticatedUser.testCreateAuthorizationWithClientIdAndSecret.txt │ ├── AuthenticatedUser.testCreateAuthorizationWithAllArguments.txt │ ├── Exceptions.testJSONParseError.txt │ ├── Repository.testBadSubscribePubSubHubbub.txt │ ├── NamedUser.testAttributesOfOtherUser.txt │ ├── Repository.testCreateGitTree.txt │ ├── Github.testGetEmojis.txt │ ├── Authentication.testJWTAuthentication.txt │ ├── Repository.testCreateGitTreeWithSha.txt │ ├── Authentication.testAppAuthTokenAuthentication.txt │ ├── Authentication.testOAuthAuthentication.txt │ ├── Authentication.testTokenAuthentication.txt │ ├── Issue.testCreateComment.txt │ ├── Migration.testDelete.txt │ ├── Milestone.testEditWithMinimalParameters.txt │ ├── Repository.testGetLabels.txt │ ├── Repository.testRemoveInvitation.txt │ ├── Migration.testUnlockRepo.txt │ ├── RepositoryKey.testDelete.txt │ ├── Branch.testEditProtectionPushRestrictionsWithUserOwnedBranch.txt │ ├── Github.testGetHook.txt │ ├── Branch.testEditProtectionDismissalUsersWithUserOwnedBranch.txt │ ├── Organization.testEditWithoutArguments.txt │ ├── Repository.testCreateMilestoneWithMinimalArguments.txt │ ├── BadAttributes.testBadSimpleAttributeInList.txt │ ├── PullRequest.testGetIssueComment.txt │ ├── PullRequest.testGetIssueComments.txt │ ├── Logging.testLoggingWithBaseUrl.txt │ ├── Logging.testLoggingWithoutAuthentication.txt │ ├── CommitComment.testEdit.txt │ ├── Issue.testEditWithoutParameters.txt │ ├── Milestone.testEditWithAllParameters.txt │ ├── Authentication.testBasicAuthentication.txt │ ├── Authentication.testLoginAuthentication.txt │ ├── Notification.testMarkAsRead.txt │ ├── Organization.testInviteUserWithBoth.txt │ ├── Repository.testCreateGitTag.txt │ ├── Github.testGetHookDeliveries.txt │ ├── AuthenticatedUser.testEditWithoutArguments.txt │ ├── Issue.testUnlock.txt │ ├── SpecificExceptions.test2FARequired.txt │ ├── AuthenticatedUser.testAttributes.txt │ ├── NamedUser.setUp.txt │ ├── Issue54.testConversion.txt │ ├── PullRequest.testCreateIssueComment.txt │ ├── AuthenticatedUser.testMarkNotificationsAsRead.txt │ ├── ReleaseAsset.testDelete.txt │ ├── Branch.testRemoveRequiredSignatures.txt │ ├── Repository.testCreateMilestone.txt │ ├── Commit.testCreateStatusWithoutOptionalParameters.txt │ ├── Repository.testRemoveAutolink.txt │ ├── Organization.testGetMembers.txt │ ├── Github.testGetGitignoreTemplates.txt │ ├── Organization.testGetOutsideCollaborators.txt │ ├── Repository.testCreateIssue.txt │ ├── Issue.testDeleteReaction.txt │ ├── Repository.testGetMilestones.txt │ ├── Repository.testGetTopics.txt │ ├── Logging.testLoggingWithOAuthAuthentication.txt │ ├── Migration.testGetArchiveUrlWhenDeleted.txt │ ├── CommitComment.testDeleteReaction.txt │ ├── Migration.testGetArchiveUrlWhenNotExported.txt │ ├── Organization.testDeleteHook.txt │ ├── Traffic.testGetReferrers.txt │ ├── Commit.testCreateComment.txt │ ├── IssueComment.testDeleteReaction.txt │ ├── PullRequestComment.testDeleteReaction.txt │ ├── Repository.testCreateGitTagWithAllArguments.txt │ ├── Retry.testShouldNotRetryWhenStatusNotOnList.txt │ ├── Repository.testDeleteSecret.txt │ ├── Traffic.testGetClones.txt │ ├── Repository.testSearchIssues.txt │ ├── Issue.testLock.txt │ ├── Repository.testLegacySearchIssues.txt │ ├── Branch.testEditRequiredPullRequestReviewsWithTooLargeApprovingReviewCount.txt │ ├── Issue142.testDecodeJson.txt │ ├── Repository.testReplaceTopics.txt │ ├── Github.testGetHookDelivery.txt │ ├── Issue.testGetEvents.txt │ ├── Branch.testEditRequiredPullRequestReviewsWithUserBranchAndDismissalUsers.txt │ ├── AuthenticatedUser.testCreateKey.txt │ ├── PullRequestComment.testEdit.txt │ ├── Logging.testLoggingWithBasicAuthentication.txt │ ├── Commit.testCreateCommentOnFileLine.txt │ ├── Commit.testCreateStatusWithAllParameters.txt │ └── Commit.testCreateCommentOnFilePosition.txt ├── .readthedocs.yml ├── MAINTAINERS ├── .git-blame-ignore-revs ├── scripts └── prepare_release.sh ├── tox.ini ├── DEPLOY.md └── .pre-commit-config.yaml /github/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements/docs.txt: -------------------------------------------------------------------------------- 1 | sphinx <3 2 | Jinja2 <3.1 3 | sphinx-rtd-theme <1.1 4 | -------------------------------------------------------------------------------- /requirements/types.txt: -------------------------------------------------------------------------------- 1 | mypy >=1.0.0 2 | types-deprecated 3 | types-jwt 4 | types-requests 5 | -------------------------------------------------------------------------------- /doc/github.rst: -------------------------------------------------------------------------------- 1 | Main class: Github 2 | ================== 3 | 4 | .. autoclass:: github.MainClass.Github 5 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [sfdye, s-t-e-v-e-n-k, enricomi] 4 | -------------------------------------------------------------------------------- /doc/github_integration.rst: -------------------------------------------------------------------------------- 1 | Main class: GithubIntegration 2 | ============================= 3 | 4 | .. autoclass:: github.GithubIntegration.GithubIntegration 5 | -------------------------------------------------------------------------------- /requirements/test.txt: -------------------------------------------------------------------------------- 1 | httpretty >=1.0.3 2 | pytest >=5.3 3 | pytest-cov >=2.8 4 | pytest-github-actions-annotate-failures <1.0.0 5 | pytest-subtests >=0.11.0 6 | -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | PyGithub 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | introduction 8 | examples 9 | reference 10 | changes 11 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | after_n_builds: 4 3 | 4 | codecov: 5 | disable_default_path_fixes: true # Automatic detection does not discover all files 6 | 7 | fixes: 8 | - "::github/" 9 | -------------------------------------------------------------------------------- /doc/reference.rst: -------------------------------------------------------------------------------- 1 | Reference 2 | ========= 3 | 4 | .. automodule:: github 5 | :no-members: 6 | 7 | .. toctree:: 8 | github 9 | github_integration 10 | apis 11 | utilities 12 | github_objects 13 | -------------------------------------------------------------------------------- /tests/ReplayData/Requester.testBaseUrlHostRedirection.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | www.github.com 4 | None 5 | /repos/PyGithub/PyGithub 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 301 9 | [('Content-Length', '0'), ('Location', 'https://github.com/repos/PyGithub/PyGithub')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Requester.testBaseUrlSchemeRedirection.txt: -------------------------------------------------------------------------------- 1 | http 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 301 9 | [('Content-Length', '0'), ('Location', 'https://api.github.com/repos/PyGithub/PyGithub')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Requester.testBaseUrlPortRedirection.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 301 9 | [('Content-Length', '0'), ('Location', 'https://api.github.com:443/repos/PyGithub/PyGithub')] 10 | -------------------------------------------------------------------------------- /doc/examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | 5 | .. toctree:: 6 | examples/Authentication 7 | examples/MainClass 8 | examples/Repository 9 | examples/Branch 10 | examples/Commit 11 | examples/PullRequest 12 | examples/Issue 13 | examples/Milestone 14 | examples/Webhook 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | open-pull-requests-limit: 10 8 | - package-ecosystem: pip 9 | directory: "/" 10 | schedule: 11 | interval: weekly 12 | open-pull-requests-limit: 10 13 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | build: 9 | os: ubuntu-22.04 10 | tools: 11 | python: "3.8" 12 | 13 | sphinx: 14 | configuration: doc/conf.py 15 | 16 | python: 17 | install: 18 | - method: pip 19 | path: . 20 | - requirements: requirements/docs.txt 21 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Adam Dangoor (@adamtheturtle) 2 | Jimmy Zelinskie (@jzelinskie) 3 | Nhomar Hernández (@nhomar) 4 | Vincent Jacques (@jacquev6) 5 | Wan Liuyang (@sfdye) 6 | Steve Kowalik (@s-t-e-v-e-n-k) 7 | Enrico Minack (@EnricoMi) 8 | Jonathan Leitschuh (@JLLeitschuh) 9 | -------------------------------------------------------------------------------- /tests/ReplayData/Team.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /teams/189850 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4946'), ('x-ratelimit-limit', '5000'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 26 May 2012 21:16:46 GMT')] 10 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Apply black to whole codebase 2 | 6ceb9e9a15dd82942698c4f891627303de05c91e 3 | 4 | # Fix isort - add known first and third party 5 | 540a0850017e836f13a8c566abfdf7f6a952ffe3 6 | 7 | # Format with new black 8 | 07e29fe014b7e214e72b51129fbef55468a7309d 9 | 10 | # Add pyupgrade to pre-commit 11 | e113e37de1ec687c68337d777f3629251b35ab28 12 | 13 | # Run pre-commit autoupdate and run all hooks 14 | 4c24c73d34b54a061b0c800eeea64dc64c230a63 15 | -------------------------------------------------------------------------------- /tests/ReplayData/UserKey.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /user/keys/2626650 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4977'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 26 May 2012 19:58:16 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Authorization.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /authorizations/372259 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4992'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Tue, 22 May 2012 18:25:53 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/GistComment.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /gists/2729810/comments/323629 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4984'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 07:14:33 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Hook.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4986'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 05:09:01 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Hook.testPing.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993/pings 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4980'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 06:04:06 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Hook.testTest.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993/tests 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4980'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 06:04:06 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Label.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels/Bug 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4961'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 10:17:53 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Download.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/downloads/242550 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4950'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Tue, 22 May 2012 19:16:03 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Milestone.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones/1 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4938'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 10:34:44 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/CommitComment.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/comments/1361949 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4974'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Tue, 22 May 2012 18:44:06 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/SpecificExceptions.testBadUserAgent.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': ''} 7 | None 8 | 403 9 | [('date', 'Fri, 17 May 2013 12:16:34 GMT'), ('content-length', '107'), ('content-type', 'application/octet-stream'), ('connection', 'keep-alive'), ('server', 'GitHub.com')] 10 | {"message":"Missing or invalid User Agent string. See http://developer.github.com/v3/#user-agent-required"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/IssueComment.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/comments/5808311 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4975'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sun, 20 May 2012 11:57:12 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequestComment.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/pulls/comments/886298 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4936'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sun, 27 May 2012 10:49:27 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/GitRef.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4984'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Thu, 10 May 2012 18:49:22 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Exceptions.testBadAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 401 9 | [('status', '401 Unauthorized'), ('content-length', '29'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"ca6a3702f840b6bff0bb1bca6be0337c"'), ('date', 'Sat, 02 Jun 2012 12:12:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Bad credentials"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/SpecificExceptions.testBadCredentials.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 401 9 | [('status', '401 Unauthorized'), ('content-length', '29'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"ca6a3702f840b6bff0bb1bca6be0337c"'), ('date', 'Sat, 02 Jun 2012 12:12:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Bad credentials"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testAuthorizationHeaderWithLogin.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic ZmFrZV9sb2dpbjpmYWtlX3Bhc3N3b3Jk', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 401 9 | [('status', '401 Unauthorized'), ('content-length', '29'), ('x-github-media-type', 'github.beta; format=json'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('date', 'Thu, 28 Mar 2013 20:14:22 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Bad credentials"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testAuthorizationHeaderWithToken.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'token ZmFrZV9sb2dpbjpmYWtlX3Bhc3N3b3Jk', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 403 9 | [('status', '403 Forbidden'), ('content-length', '50'), ('x-github-media-type', 'github.beta; format=json'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('date', 'Thu, 28 Mar 2013 20:15:00 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Max number of login attempt exceeded"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/PaginatedList.testNoFirstPage.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/openframeworks/openFrameworks/issues 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4927'), ('content-length', '52085'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"5e8867ffb4e7630e852b2b231f3b9cdb"'), ('date', 'Tue, 29 May 2012 19:36:57 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Exceptions.testUnknownUser.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/ThisUserShouldReallyNotExist 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 404 9 | [('status', '404 Not Found'), ('x-ratelimit-remaining', '4968'), ('content-length', '23'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e66a7a6c91e2c26803f3f49feb7a883f"'), ('date', 'Sat, 02 Jun 2012 12:24:43 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Not Found"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetLanguages.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/languages 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4941'), ('content-length', '29'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"7d14a65f22f237036a50f0d982721206"'), ('date', 'Sun, 27 May 2012 07:06:51 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"Shell":673,"Python":127266} 11 | -------------------------------------------------------------------------------- /scripts/prepare_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | # update file headers 6 | python scripts/fix_headers.py 7 | 8 | # creates a changelog based on the commits from the previous version until now 9 | previousVersion=$(git tag -l --merged main | tail -n1) 10 | changelog=$(tail -n +6 doc/changes.rst) 11 | gitlog=$(git log $previousVersion.. --oneline --pretty=format:'* %s (%h)') 12 | today=$(date "+(%B %d, %Y)") 13 | echo -e "Change log\n==========\n\nStable versions\n~~~~~~~~~~~~~~~\n\nVersion ?.?.? $today\n-----------------------------------\n\n$gitlog\n$changelog" > doc/changes.rst 14 | -------------------------------------------------------------------------------- /tests/ReplayData/Exceptions.testNonJsonDataReturnedByGithub.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 503 9 | [('status', '503 Servive Unavailable'), ('content-length', '104'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"ca6a3702f840b6bff0bb1bca6be0337c"'), ('date', 'Sat, 02 Jun 2012 12:12:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 |

503 Service Unavailable

No server is available to handle this request. 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue134.testGetAuthorizationsFailsWhenAutenticatedThroughOAuth.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /authorizations 6 | {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 404 9 | [('status', '404 Not Found'), ('content-length', '23'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-remaining', '55'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '60'), ('cache-control', ''), ('date', 'Tue, 29 Jan 2013 18:19:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Not Found"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetTeamBySlug.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/teams/Members 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('x-ratelimit-limit', '5000'), ('content-length', '128'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"f93241eaf43847bcf38b352f25595e28"'), ('date', 'Tue, 18 Jun 2019 10:32:13 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"repos_count":1,"permission":"push","url":"https://api.github.com/teams/141496","name":"Members","id":141496,"members_count":1} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testMergeWithNothingToDo.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/merges 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"commit_message": "Commit message created by PyGithub", "head": "branchForHead", "base": "branchForBase"} 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4985'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Sat, 08 Sep 2012 12:22:53 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetTeams.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/teams 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4973'), ('content-length', '150'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"43d7c883d1cb7d50a08d2c189550023c"'), ('date', 'Sun, 27 May 2012 05:13:46 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/teams/141496","name":"Members","id":141496},{"url":"https://api.github.com/teams/141487","name":"Owners","id":141487}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testGetNotificationsWithOtherArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /notifications?all=true 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('content-length', '2'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d751713988987e9331980363e24189ce"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Tue, 19 Mar 2013 21:05:52 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testMergeWithConflict.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/merges 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"head": "branchForHead", "base": "branchForBase"} 8 | 409 9 | [('status', '409 Conflict'), ('content-length', '28'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-remaining', '4980'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Sat, 08 Sep 2012 12:29:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Merge conflict"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Team.testEditWithoutArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /teams/189850 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"name": "Name edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4952'), ('content-length', '144'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"843001aba6d35f27320c0788c9ff64b1"'), ('date', 'Sat, 26 May 2012 21:14:39 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"permission":"pull","members_count":0,"url":"https://api.github.com/teams/189850","repos_count":0,"name":"Name edited by PyGithub","id":189850} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequest.testGetLabels.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub/issues/31/labels 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4996'), ('content-length', '214'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c9f9beccb03030beaf7b80927da6fef6"'), ('date', 'Sun, 27 May 2012 08:56:31 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/repos/PyGithub/PyGithub/labels/wip","name":"wip","color":"eb6420"},{"url":"https://api.github.com/repos/PyGithub/PyGithub/labels/refactoring","name":"refactoring","color":"fbca04"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Markdown.testRenderMarkdown.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /markdown 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"text": "MyTitle\n=======\n\nIssue #1"} 8 | 200 9 | [('status', '200 OK'), ('content-length', '133'), ('x-ratelimit-remaining', '4985'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"4cb17c0ebe3cc45c1a7f27d4d0850c54"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Fri, 13 Jul 2012 11:59:59 GMT'), ('content-type', 'text/html;charset=utf-8')] 10 |

MyTitle

Issue #1

11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCollaboratorPermissionNoPushAccess.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/collaborators/lyloa/permission 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 403 9 | [('status', '403 Forbidden'), ('x-ratelimit-remaining', '4980'), ('content-length', '37'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"2743ecba84275ee9f0aa8e9edc5ed691"'), ('date', 'Mon, 27 Aug 2018 01:10:27 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"documentation_url": "https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level", "message": "Must have push access to view collaborator permission."} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testGetOrgs.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user/orgs 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4962'), ('content-length', '262'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1534f44ae64c7b70fb520ea37de4328d"'), ('date', 'Sat, 26 May 2012 20:18:49 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/orgs/BeaverSoftware","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/NamedUser.testGetOrgs.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6/orgs 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4949'), ('content-length', '262'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"82deae94305d8c551e4874e06f6efd48"'), ('date', 'Sun, 20 May 2012 12:27:03 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","url":"https://api.github.com/orgs/BeaverSoftware","login":"BeaverSoftware","id":1424031}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Team.testGetTeams.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /teams/189850/teams 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4973'), ('content-length', '150'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"43d7c883d1cb7d50a08d2c189550023c"'), ('date', 'Sun, 27 May 2012 05:13:46 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"name":"DummyTeam1","id":189851,"parent":{"name":"Team created by PyGithub","id":189850}},{"name":"DummyTeam2","id":189852,"parent":{"name":"Team created by PyGithub","id":189850}},{"name":"DummyTeam3","id":189853,"parent":{"name":"Team created by PyGithub","id":189850}}] 11 | -------------------------------------------------------------------------------- /doc/examples/Commit.rst: -------------------------------------------------------------------------------- 1 | Commit 2 | ====== 3 | 4 | Create commit status check 5 | -------------------------- 6 | 7 | .. code-block:: python 8 | 9 | # sha -> commit on which the status check will be created 10 | # For example, for a webhook payload 11 | # sha = data["pull_request"]["head"]["sha"] 12 | repo.get_commit(sha=sha).create_status( 13 | state="pending", 14 | target_url="https://FooCI.com", 15 | description="FooCI is building", 16 | context="ci/FooCI" 17 | ) 18 | 19 | Get commit date 20 | -------------------------- 21 | 22 | .. code-block:: python 23 | 24 | >>> commit = repo.get_commit(sha=sha) 25 | >>> print(commit.commit.author.date) 26 | 2018-10-11 03:04:52 27 | >>> print(commit.commit.committer.date) 28 | 2018-10-11 03:04:52 29 | -------------------------------------------------------------------------------- /tests/ReplayData/Milestone.testGetLabels.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones/1/labels 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4942'), ('content-length', '253'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"cd4ed3176e27a01da9a51f84c7b19b63"'), ('date', 'Sat, 19 May 2012 10:33:15 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Public+interface","name":"Public interface","color":"d7e102"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Project+management","name":"Project management","color":"444444"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetLabel.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels/Label%20with%20silly%20name%20%25%20%2A%20%2B%20created%20by%20PyGithub 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4983'), ('content-length', '191'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"92b623552b1bac3f019d03c920305acd"'), ('date', 'Sat, 19 May 2012 10:12:54 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+silly+name+%25+%2A+%2B+created+by+PyGithub","name":"Label with silly name % * + created by PyGithub","color":"00ff00"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testCreateTeam.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/teams 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"name": "Team created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4988'), ('content-length', '145'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"189a318993cde3e040f2efb4f634f8a8"'), ('date', 'Sat, 26 May 2012 20:58:53 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/teams/189850')] 10 | {"url":"https://api.github.com/teams/189850","members_count":0,"repos_count":0,"name":"Team created by PyGithub","permission":"pull","id":189850} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetHookDeliveries.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks/257993/deliveries 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetSecrets.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/actions/secrets 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '487'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1dd282b50e691f8f162ef9355dad8771"'), ('date', 'Thu, 10 May 2012 19:03:19 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"total_count": 1, "secrets": [{"name": "secret-name","created_at": "2019-08-10T14:59:22Z","updated_at": "2020-01-10T14:59:22Z","visibility": "selected","selected_repositories_url": "https://api.github.com/orgs/BeaverSoftware/actions/secrets/secret-name/repositories"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetDownloads.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/downloads 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4968'), ('content-length', '277'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"209ba3e85bfec4914fb88bb2d12b55e9"'), ('date', 'Sun, 27 May 2012 06:55:04 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"content_type":".py","download_count":0,"url":"https://api.github.com/repos/jacquev6/PyGithub/downloads/245143","size":1024,"name":"Hook.py","created_at":"2012-05-27T06:54:54Z","description":"","id":245143,"html_url":"https://github.com/downloads/jacquev6/PyGithub/Hook.py"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetHookDeliveries.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993/deliveries 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Exceptions.testInvalidInput.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /user/keys 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"key": "xxx", "title": "Bad key"} 8 | 422 9 | [('status', '422 Unprocessable Entity'), ('x-ratelimit-remaining', '4995'), ('content-length', '221'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"73f756ef75655dd74463eb1bf4cfefe1"'), ('date', 'Wed, 30 May 2012 07:00:27 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"message":"Validation Failed","errors":[{"field":"key","resource":"PublicKey","message":"key is invalid. It must begin with 'ssh-rsa' or 'ssh-dss'. Check that you're copying the public half of the key","code":"custom"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetHooks.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"updated_at":"2012-05-27T06:00:32Z","last_response":{"status":"ok","message":"OK","code":200},"events":["push"],"url":"https://api.github.com/orgs/BeaverSoftware/hooks/257993","active":true,"name":"web","config":{"url":"http://foobar.com"},"id":257993,"created_at":"2012-05-19T06:01:45Z"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetVariables.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/actions/variables 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '487'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1dd282b50e691f8f162ef9355dad8771"'), ('date', 'Thu, 10 May 2012 19:03:19 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"total_count": 1, "variables": [{"name": "variable-name","created_at": "2019-08-10T14:59:22Z","updated_at": "2020-01-10T14:59:22Z","visibility": "selected","selected_repositories_url": "https://api.github.com/orgs/BeaverSoftware/actions/variables/variable-name/repositories"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetDependabotSecrets.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/dependabot/secrets 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '487'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1dd282b50e691f8f162ef9355dad8771"'), ('date', 'Thu, 10 May 2012 19:03:19 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"total_count": 1, "secrets": [{"name": "secret-name","created_at": "2019-08-10T14:59:22Z","updated_at": "2020-01-10T14:59:22Z","visibility": "selected","selected_repositories_url": "https://api.github.com/orgs/BeaverSoftware/dependabot/secrets/secret-name/repositories"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetHook.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks/257993 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"updated_at":"2012-05-27T06:00:32Z","last_response":{"status":"ok","message":"OK","code":200},"events":["push"],"url":"https://api.github.com/orgs/BeaverSoftware/hooks/257993","active":true,"name":"web","config":{"url":"http://foobar.com"},"id":257993,"created_at":"2012-05-19T06:01:45Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetHooks.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"updated_at":"2012-05-27T06:00:32Z","last_response":{"status":"ok","message":"OK","code":200},"events":["push"],"url":"https://api.github.com/repos/jacquev6/PyGithub/hooks/257993","active":true,"name":"web","config":{"url":"http://foobar.com"},"id":257993,"created_at":"2012-05-19T06:01:45Z"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authorization.setUp.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /authorizations/372259 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4986'), ('content-length', '328'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e15ef91b6fe4705f493fca75475b763b"'), ('date', 'Tue, 22 May 2012 18:03:49 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"scopes":[],"note_url":null,"updated_at":"2012-05-22T18:03:17Z","app":{"url":"http://developer.github.com/v3/oauth/#oauth-authorizations-api","name":"GitHub API"},"url":"https://api.github.com/authorizations/372259","token":"82459c4500086f8f0cc67d2936c17d1e27ad1c33","note":null,"created_at":"2012-05-22T18:03:17Z","id":372259} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Markdown.testRenderGithubFlavoredMarkdown.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /markdown 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"text": "MyTitle\n=======\n\nIssue #1", "mode": "gfm", "context": "jacquev6/PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('content-length', '150'), ('x-ratelimit-remaining', '4988'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"63251bf7dbb58f62c59ae39bb72c7a38"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Fri, 13 Jul 2012 11:59:58 GMT'), ('content-type', 'text/html;charset=utf-8')] 10 |

MyTitle

Issue #1

11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetPublicMembers.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/public_members 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4989'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"867ed1ef11213cc9045509b0fa544132"'), ('date', 'Sun, 27 May 2012 05:07:44 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"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}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testInviteUserAsNonOwner.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/invitations 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json', 'Accept': 'application/vnd.github.dazzler-preview+json'} 7 | {"email": "bar@example.com"} 8 | 403 9 | [('status', '403 Forbidden'), ('x-ratelimit-remaining', '4980'), ('content-length', '37'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"fb43ecb6e2f75e3940aa8e9edc5ed691"'), ('date', 'Sun, 26 Aug 2018 01:19:54 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"documentation_url": "https://developer.github.com/v3/orgs/members/#create-organization-invitation", "message": "You must be an admin to create an invitation to an organization."} 11 | -------------------------------------------------------------------------------- /.github/workflows/pypi-release.yml: -------------------------------------------------------------------------------- 1 | name: Publish to PyPI 2 | on: 3 | push: 4 | tags: ["*"] # this will run full workflow including publish to PyPI 5 | workflow_dispatch: 6 | 7 | jobs: 8 | build: 9 | uses: "./.github/workflows/_build-pkg.yml" 10 | with: 11 | artifact-name: package 12 | 13 | publish: 14 | needs: [build] 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/download-artifact@v3 18 | with: 19 | name: package 20 | path: dist 21 | - name: Install twine 22 | run: pip install -q twine 23 | - name: Publish 📦 to PyPI 24 | # only run this for tags 25 | if: startsWith(github.event.ref, 'refs/tags/') 26 | env: 27 | TWINE_USERNAME: __token__ 28 | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} 29 | run: twine upload dist/* 30 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetContributors.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/contributors 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4963'), ('content-length', '318'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"3ce61bc2417a6a4f7b47976a7969c711"'), ('date', 'Sun, 20 May 2012 12:10:52 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"contributions":355,"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"}] 11 | -------------------------------------------------------------------------------- /.github/workflows/_build-pkg.yml: -------------------------------------------------------------------------------- 1 | name: Build package 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | artifact-name: 7 | description: "Name of an artifact" 8 | type: "string" 9 | required: false 10 | default: "package" 11 | 12 | jobs: 13 | build-pkg: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Set up Python 18 | uses: actions/setup-python@v4 19 | with: 20 | python-version: '3.x' 21 | 22 | - name: Install dependencies 23 | run: pip install -U build twine 24 | - name: Build 📦 package 25 | run: python -m build 26 | - name: Check 📦 package 27 | run: twine check dist/* 28 | 29 | - uses: actions/upload-artifact@v3 30 | with: 31 | name: ${{ inputs.artifact-name }} 32 | path: dist 33 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testGetLabels.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/labels 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4996'), ('content-length', '335'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c9f9beccb03030beaf7b80927da6fef6"'), ('date', 'Sun, 27 May 2012 08:56:31 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Project+management","name":"Project management","color":"444444"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Question","name":"Question","color":"02e10c"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitBlob.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/blobs 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"content": "Blob created by PyGithub", "encoding": "latin1"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4997'), ('content-length', '156'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f5cc2fa3ba4de95ac0eb8c2ca47350c0"'), ('date', 'Fri, 11 May 2012 11:43:09 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/blobs/5dd930f591cd5188e9ea7200e308ad355182a1d8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/blobs/5dd930f591cd5188e9ea7200e308ad355182a1d8","sha":"5dd930f591cd5188e9ea7200e308ad355182a1d8"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testGetAuthorizations.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /authorizations 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4990'), ('content-length', '384'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f6052ad2b9941ba0829e326bd76377a3"'), ('date', 'Tue, 22 May 2012 18:31:38 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"scopes":["repo"],"updated_at":"2012-05-22T18:27:36Z","app":{"url":"http://vincent-jacques.net/PyGithub","name":"Note created by PyGithub (API)"},"url":"https://api.github.com/authorizations/372294","token":"b7fd2a0346d9d590b1fad5e10971e8d29637a4ce","note_url":"http://vincent-jacques.net/PyGithub","note":"Note created by PyGithub","created_at":"2012-05-22T18:27:36Z","id":372294}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Label.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels/Bug 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.symmetra-preview+json'} 7 | {"color": "0000ff", "new_name": "LabelEditedByPyGithub", "description": "Description of LabelEditedByPyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4965'), ('content-length', '133'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"57435796bd4f14b84ad92105669cfab1"'), ('date', 'Sat, 19 May 2012 10:17:44 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/LabelEditedByPyGithub","name":"LabelEditedByPyGithub","color":"0000ff","description":"Description of LabelEditedByPyGithub"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetIssues.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/issues 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4981'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('cache-control', 'max-age=0, private, must-revalidate'), ('vary', 'Accept-Encoding'), ('content-length', '2'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d751713988987e9331980363e24189ce"'), ('access-control-allow-credentials', 'true'), ('date', 'Fri, 17 May 2013 11:50:06 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8')] 10 | [] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue50.testGetLabel.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels/Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '197'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4964'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:32:14 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Hook.testEditWithMinimalParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"config": {"url": "http://foobar.com/hook"}, "name": "web"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4990'), ('content-length', '303'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"8628a600a78bd5171c9e8d23b1ec22de"'), ('date', 'Sat, 19 May 2012 05:08:16 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"last_response":{"status":"unused","message":null,"code":null},"updated_at":"2012-05-19T05:08:16Z","url":"https://api.github.com/repos/jacquev6/PyGithub/hooks/257993","config":{"url":"http://foobar.com/hook"},"active":true,"events":["push"],"name":"web","created_at":"2012-05-19T05:03:14Z","id":257993} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/GitRef.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"sha": "04cde900a0775b51f762735637bd30de392a2793"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4986'), ('content-length', '322'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"ced480ad69948233f6520f7cd945eb34"'), ('date', 'Thu, 10 May 2012 18:49:20 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub","object":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/04cde900a0775b51f762735637bd30de392a2793","type":"commit","sha":"04cde900a0775b51f762735637bd30de392a2793"},"ref":"refs/heads/BranchCreatedByPyGithub"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testCreateAuthorizationWithoutArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /authorizations 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4987'), ('content-length', '328'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"4a48781fcd24441dade6248aab748487"'), ('date', 'Tue, 22 May 2012 18:03:17 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/authorizations/372259')] 10 | {"scopes":[],"updated_at":"2012-05-22T18:03:17Z","app":{"url":"http://developer.github.com/v3/oauth/#oauth-authorizations-api","name":"GitHub API"},"url":"https://api.github.com/authorizations/372259","token":"82459c4500086f8f0cc67d2936c17d1e27ad1c33","note":null,"created_at":"2012-05-22T18:03:17Z","note_url":null,"id":372259} 11 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = 3 | lint, 4 | py{37,38,39,310,311}, 5 | docs 6 | 7 | [gh-actions] 8 | # this make sure each ci job only run tests once. 9 | # keey it sync with workflows/ci.yaml matrix 10 | python = 11 | 3.7: py37 12 | 3.8: py38 13 | 3.9: py39 14 | 3.10: py310 15 | 3.11: py311 16 | 17 | [testenv] 18 | deps = -rrequirements/test.txt 19 | commands = pytest --cov=github --cov-report=xml {posargs} 20 | 21 | [testenv:lint] 22 | basepython = python3.8 23 | skip_install = true 24 | deps = 25 | -r requirements/types.txt 26 | pre-commit 27 | commands = 28 | pre-commit run --all-files --show-diff-on-failure 29 | ; Run mypy outside pre-commit because pre-commit runs mypy in a venv 30 | ; that doesn't have dependencies or their type annotations installed. 31 | mypy github tests 32 | 33 | [testenv:docs] 34 | basepython = python3.8 35 | skip_install = true 36 | commands = sphinx-build doc build 37 | allowlist_externals = sphinx-build 38 | -------------------------------------------------------------------------------- /tests/ReplayData/GitRef.testEditWithForce.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"sha": "4303c5b90e2216d927155e9609436ccb8984c495", "force": true} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('content-length', '322'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"fb39f29de1defbab14def8a331d00c69"'), ('date', 'Thu, 10 May 2012 18:49:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub","object":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/4303c5b90e2216d927155e9609436ccb8984c495","type":"commit","sha":"4303c5b90e2216d927155e9609436ccb8984c495"},"ref":"refs/heads/BranchCreatedByPyGithub"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetHookDelivery.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks/257993/deliveries/12345 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com","request":{"headers":{"content-type": "application/json"},"payload":{"action": "opened"}},"response":{"headers":{"content-type": "text/html;charset=utf-8"},"payload":"ok"}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/ConditionalRequestUpdate.testDidNotUpdate.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/akfish/PyGithub 6 | {'If-None-Match': '"8600bedcb7fed1d8065e1693e05529ce"', 'User-Agent': 'PyGithub/Python', 'Authorization': 'Basic login_and_password_removed', 'If-Modified-Since': 'Thu, 22 Aug 2013 02:09:11 GMT'} 7 | None 8 | 304 9 | [('status', '304 Not Modified'), ('x-ratelimit-remaining', '4988'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('last-modified', 'Thu, 22 Aug 2013 02:09:11 GMT'), ('x-ratelimit-limit', '5000'), ('etag', '"8600bedcb7fed1d8065e1693e05529ce"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Thu, 22 Aug 2013 02:13:10 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1377140429')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetHookDelivery.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks/257993/deliveries/12345 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4953'), ('content-length', '295'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"07e5e1a2fafd1a5e2de62eb3afd007d5"'), ('date', 'Sun, 27 May 2012 07:02:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com","request":{"headers":{"content-type": "application/json"},"payload":{"action": "opened"}},"response":{"headers":{"content-type": "text/html;charset=utf-8"},"payload":"ok"}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testUnsubscribePubSubHubbub.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /hub 6 | {'Content-Type': 'multipart/form-data; boundary=----------------------------3c3ba8b523b2', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | ------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.callback"http://requestb.in/1bc1sc61------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.topic"https://github.com/jacquev6/PyGithub/events/push------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.mode"unsubscribe------------------------------3c3ba8b523b2-- 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4991'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Tue, 05 Feb 2013 18:58:12 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testGetNotification.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /notifications/threads/8406712 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '16567'), ('server', 'nginx'), ('last-modified', 'Fri, 24 Aug 2012 07:05:12 GMT'), ('connection', 'keep-alive'), ('etag', '"eb52c03081d2fc22f26ed2718921e500"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sat, 08 Sep 2012 17:26:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"id": "8406712","unread": false,"reason": "author","updated_at": "2013-03-15T05:43:11Z","last_read_at": "2013-03-15T06:06:34Z","subject": {"title": "Feature/coveralls","type": "PullRequest"},"repository": {"id": 8432784}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testSearchUserByEmail.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /legacy/user/email/vincent@vincent-jacques.net 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4981'), ('content-length', '395'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"baf55235e157428f731c446efe6d6cba"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 20:58:11 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"user":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","type":"User","location":"Paris, France","blog":"http://vincent-jacques.net","name":"Vincent Jacques","permission":null,"public_repo_count":11,"login":"jacquev6","email":"vincent@vincent-jacques.net","public_gist_count":3,"created_at":"2010-07-08T23:10:06-07:00","id":327146,"followers_count":13,"following_count":24,"company":"Criteo"}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testGetNotifications.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /notifications?participating=true 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '16567'), ('server', 'nginx'), ('last-modified', 'Fri, 24 Aug 2012 07:05:12 GMT'), ('connection', 'keep-alive'), ('etag', '"eb52c03081d2fc22f26ed2718921e500"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sat, 08 Sep 2012 17:26:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"id": "8406712","unread": false,"reason": "author","updated_at": "2013-03-15T05:43:11Z","last_read_at": "2013-03-15T06:06:34Z","subject": {"title": "Feature/coveralls","type": "PullRequest"},"repository": {"id": 8432784}}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testCreateHookWithMinimalParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"config": {"url": "http://foobar.com"}, "name": "web"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4994'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"276d18854081948260c44cf645c54bd0"'), ('date', 'Sat, 19 May 2012 05:03:14 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/orgs/BeaverSoftware/hooks/257967')] 10 | {"updated_at":"2012-05-19T05:03:14Z","url":"https://api.github.com/orgs/BeaverSoftware/hooks/257967","config":{"url":"http://foobar.com"},"last_response":{"status":"unused","message":null,"code":null},"active":true,"events":["push"],"name":"web","created_at":"2012-05-19T05:03:14Z","id":257967} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/UserKey.setUp.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user/keys/2626650 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4983'), ('content-length', '505'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"7261ec55c886d6bf42e48d5bf9544586"'), ('date', 'Sat, 26 May 2012 19:53:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/user/keys/2626650","key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Mm0RjTNAYFfSCtUpO54usdseroUSIYg5KX4JoseTpqyiB/hqewjYLAdUq/tNIQzrkoEJWSyZrQt0ma7/YCyMYuNGd3DU6q6ZAyBeY3E9RyCiKjO3aTL2VKQGFvBVVmGdxGVSCITRphAcsKc/PF35/fg9XP9S0anMXcEFtdfMHz41SSw+XtE+Vc+6cX9FuI5qUfLGbkv8L1v3g4uw9VXlzq4GfTA+1S7D6mcoGHopAIXFlVr+2RfDKdSURMcB22z41fljO1MW4+zUS/4FyUTpL991es5fcwKXYoiE+x06VJeJJ1Krwx+DZj45uweV6cHXt2JwJEI9fWB6WyBlDejWw==","verified":true,"title":"Key added through PyGithub","id":2626650} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateHookWithMinimalParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"config": {"url": "http://foobar.com"}, "name": "web"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4994'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"276d18854081948260c44cf645c54bd0"'), ('date', 'Sat, 19 May 2012 05:03:14 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/hooks/257967')] 10 | {"updated_at":"2012-05-19T05:03:14Z","url":"https://api.github.com/repos/jacquev6/PyGithub/hooks/257967","config":{"url":"http://foobar.com"},"last_response":{"status":"unused","message":null,"code":null},"active":true,"events":["push"],"name":"web","created_at":"2012-05-19T05:03:14Z","id":257967} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetKeys.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/keys 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4947'), ('content-length', '507'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c53f260d8e74caefe7af2efeeda39e98"'), ('date', 'Sun, 27 May 2012 07:04:34 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/user/keys/2626761","verified":true,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Mm0RjTNAYFfSCtUpO54usdseroUSIYg5KX4JoseTpqyiB/hqewjYLAdUq/tNIQzrkoEJWSyZrQt0ma7/YCyMYuNGd3DU6q6ZAyBeY3E9RyCiKjO3aTL2VKQGFvBVVmGdxGVSCITRphAcsKc/PF35/fg9XP9S0anMXcEFtdfMHz41SSw+XtE+Vc+6cX9FuI5qUfLGbkv8L1v3g4uw9VXlzq4GfTA+1S7D6mcoGHopAIXFlVr+2RfDKdSURMcB22z41fljO1MW4+zUS/4FyUTpL991es5fcwKXYoiE+x06VJeJJ1Krwx+DZj45uweV6cHXt2JwJEI9fWB6WyBlDejWw==","title":"Key added through PyGithub","id":2626761}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testCreateHookWithAllParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"active": false, "config": {"url": "http://foobar.com"}, "name": "web", "events": ["fork"]} 8 | 200 9 | [('status', '200 Ok'), ('x-ratelimit-remaining', '4997'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c3b371e4de1a0ec350b3fcc0c458e0f9"'), ('date', 'Sat, 19 May 2012 06:01:45 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/orgs/BeaverSoftware/hooks/257993')] 10 | {"updated_at":"2012-05-19T06:01:45Z","last_response":{"status":"unused","message":null,"code":null},"events":["fork"],"url":"https://api.github.com/orgs/BeaverSoftware/hooks/257993","active":true,"name":"web","config":{"url":"http://foobar.com"},"id":257993,"created_at":"2012-05-19T06:01:45Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Search.testSearchReposWithNoResults.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /search/repositories?q=doesnotexist&per_page=1 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '29'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '78F11E32:5372:9B9CAA5:531405FC'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept-Encoding'), ('content-length', '140961'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '30'), ('cache-control', 'no-cache'), ('date', 'Thu, 22 Nov 2018 14:17:01 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1393821241')] 10 | {"total_count":0,"incomplete_results":false,"items":[]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateHookWithAllParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/hooks 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"active": false, "config": {"url": "http://foobar.com"}, "name": "web", "events": ["fork"]} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4997'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c3b371e4de1a0ec350b3fcc0c458e0f9"'), ('date', 'Sat, 19 May 2012 06:01:45 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/hooks/257993')] 10 | {"updated_at":"2012-05-19T06:01:45Z","last_response":{"status":"unused","message":null,"code":null},"events":["fork"],"url":"https://api.github.com/repos/jacquev6/PyGithub/hooks/257993","active":true,"name":"web","config":{"url":"http://foobar.com"},"id":257993,"created_at":"2012-05-19T06:01:45Z"} 11 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: 'v$RESOLVED_VERSION' 2 | tag-template: 'v$RESOLVED_VERSION' 3 | categories: 4 | - title: 'Features' 5 | labels: 6 | - 'feature' 7 | - 'enhancement' 8 | - title: 'Bug Fixes' 9 | labels: 10 | - 'fix' 11 | - 'bugfix' 12 | - 'bug' 13 | - title: 'Maintenance' 14 | label: 'chore' 15 | autolabeler: 16 | - label: 'chore' 17 | files: 18 | - '*.md' 19 | branch: 20 | - '/docs{0,1}\/.+/' 21 | - label: 'bug' 22 | branch: 23 | - '/fix\/.+/' 24 | title: 25 | - '/fix/i' 26 | - label: 'enhancement' 27 | branch: 28 | - '/feature\/.+/' 29 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)' 30 | change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. 31 | version-resolver: 32 | major: 33 | labels: 34 | - 'major' 35 | minor: 36 | labels: 37 | - 'minor' 38 | patch: 39 | labels: 40 | - 'patch' 41 | default: minor 42 | template: | 43 | ## Changes 44 | 45 | $CHANGES 46 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetGitRef.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs/heads/master 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4987'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '288'), ('server', 'nginx'), ('last-modified', 'Sun, 28 Oct 2012 01:48:38 GMT'), ('connection', 'keep-alive'), ('etag', '"d7478b9ae7e3c0de496ede43edd2fdfc"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sun, 28 Oct 2012 08:58:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/master","object":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/31110327ec45f3138e58ed247b2cf420fee481ec","type":"commit","sha":"31110327ec45f3138e58ed247b2cf420fee481ec"},"ref":"refs/heads/master"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/GistComment.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /gists/2729810/comments/323629 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('content-length', '478'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4987'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"cea8090368993f1fb95c32cdcf4245d3"'), ('date', 'Sat, 19 May 2012 07:12:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/gists/2729810/comments/323629","body":"Comment edited by PyGithub","created_at":"2012-05-19T07:07:57Z","updated_at":"2012-05-19T07:12:32Z","id":323629,"user":{"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","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue50.testCreateLabel.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.symmetra-preview+json'} 7 | {"color": "ffff00", "name": "Label with spaces and strange characters (&*#$)"} 8 | 201 9 | [('status', '201 Created'), ('content-length', '197'), ('etag', '"99cbb3bf0f7ee7d6278c2ddd3ef42577"'), ('x-ratelimit-remaining', '4968'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetGitRefWithIssue102Reverted.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs/heads/master 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4987'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '288'), ('server', 'nginx'), ('last-modified', 'Sun, 28 Oct 2012 01:48:38 GMT'), ('connection', 'keep-alive'), ('etag', '"d7478b9ae7e3c0de496ede43edd2fdfc"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sun, 28 Oct 2012 08:58:25 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/master","object":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/31110327ec45f3138e58ed247b2cf420fee481ec","type":"commit","sha":"31110327ec45f3138e58ed247b2cf420fee481ec"},"ref":"refs/heads/master"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testSubscribePubSubHubbub.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /hub 6 | {'Content-Type': 'multipart/form-data; boundary=----------------------------3c3ba8b523b2', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | ------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.callback"http://requestb.in/1bc1sc61------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.topic"https://github.com/jacquev6/PyGithub/events/push------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.mode"subscribe------------------------------3c3ba8b523b2Content-Disposition: form-data; name="hub.secret"my_secret------------------------------3c3ba8b523b2-- 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4997'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Tue, 05 Feb 2013 18:57:27 GMT')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testNoAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4995'), ('content-length', '623'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"b81320548394cb55b7e97fb1636d2898"'), ('date', 'Sat, 26 May 2012 09:34:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","public_repos":11,"url":"https://api.github.com/users/jacquev6","hireable":false,"public_gists":1,"bio":"","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","blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","followers":13,"name":"Vincent Jacques","created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24,"html_url":"https://github.com/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitRef.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/refs 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"sha": "4303c5b90e2216d927155e9609436ccb8984c495", "ref": "refs/heads/BranchCreatedByPyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4987'), ('content-length', '322'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0302e489fc6bd534afa44cdbec1227e7"'), ('date', 'Thu, 10 May 2012 18:49:19 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub')] 10 | {"object":{"type":"commit","sha":"4303c5b90e2216d927155e9609436ccb8984c495","url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/4303c5b90e2216d927155e9609436ccb8984c495"},"ref":"refs/heads/BranchCreatedByPyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/git/refs/heads/BranchCreatedByPyGithub"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testAcceptInvitation.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /user/repository_invitations/4294886 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {} 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4981'), ('x-content-type-options', 'nosniff'), ('content-security-policy', "default-src 'none'"), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'D039:11DAA:17FC875:24A1090:59635F0C'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-runtime-rack', '0.072659'), ('x-xss-protection', '1; mode=block'), ('x-served-by', '7f48e2f7761567e923121f17538d7a6d'), ('date', 'Mon, 10 Jul 2017 11:03:40 GMT'), ('access-control-allow-origin', '*'), ('x-frame-options', 'deny'), ('x-ratelimit-reset', '1499685825')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue50.testIssueGetLabels.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/50/labels 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4903'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '419'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:57:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}] 11 | -------------------------------------------------------------------------------- /DEPLOY.md: -------------------------------------------------------------------------------- 1 | ## Upload a new version to PyPI 2 | 3 | Github [PyPi release](.github/workflows/pypi-release.yml) workflow will push tagged commits to PyPI. Here are the steps: 4 | 5 | 1. Run `scripts/prepare_release.sh` 6 | 7 | ```bash 8 | ./scripts/prepare_release.sh 9 | ``` 10 | 11 | 2. Complete the changes in `doc/changes.rst`: 12 | - Replace `Version ?.?.?` with the release version. 13 | - Organize commits into sub-sections like "New features" or "Bug Fixes", see earlier releases for inspiration. 14 | 15 | 3. Commit these changes and create a pull request. 16 | 17 | 4. After merging those changes into `main` branch, create a new Github [release](https://github.com/PyGithub/PyGithub/releases): 18 | - Choose the merge commit in `main`. 19 | - Choose a new tag with release version prefixed with `v`, e.g. `v2.2.0`. 20 | - Add the same release note from `doc/changes.rst`. 21 | 22 | Creating the release also creates the tag chosen, which will trigger the PyPi release workflow. 23 | 24 | 5. Once the PyPi release workflow completes, a new version will appear on [PyPI](https://pypi.org/project/PyGithub/#history) shortly. 25 | -------------------------------------------------------------------------------- /tests/ReplayData/IssueComment.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/comments/5808311 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4980'), ('content-length', '505'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1599061186ef7ca2dbf5bdee1711746a"'), ('date', 'Sun, 20 May 2012 11:53:59 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"updated_at":"2012-05-20T11:53:59Z","body":"Comment edited by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/comments/5808311","created_at":"2012-05-20T11:46:42Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"id":5808311} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateLabel.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.symmetra-preview+json'} 7 | {"color": "00ff00", "name": "Label with silly name % * + created by PyGithub", "description": "Description of label with silly name"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4969'), ('content-length', '191'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"92b623552b1bac3f019d03c920305acd"'), ('date', 'Sat, 19 May 2012 10:17:36 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+silly+name+%25+%2A+%2B+created+by+PyGithub')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+silly+name+%25+%2A+%2B+created+by+PyGithub","name":"Label with silly name % * + created by PyGithub","color":"00ff00","description":"Description of label with silly name"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testCreateAuthorizationWithClientIdAndSecret.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /authorizations 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"client_secret": "0123456789012345678901234567890123456789", "client_id": "01234567890123456789"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4991'), ('content-length', '382'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"41f3600b4ddb741cd59a00a88321af92"'), ('date', 'Tue, 22 May 2012 18:27:36 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/authorizations/372294')] 10 | {"scopes":["repo"],"updated_at":"2012-05-22T18:27:36Z","app":{"url":"http://vincent-jacques.net/PyGithub","name":"Note created by PyGithub (API)"},"url":"https://api.github.com/authorizations/372294","token":"b7fd2a0346d9d590b1fad5e10971e8d29637a4ce","note":"Note created by PyGithub","note_url":"http://vincent-jacques.net/PyGithub","created_at":"2012-05-22T18:27:36Z","id":372294} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testCreateAuthorizationWithAllArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /authorizations 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"note": "Note created by PyGithub", "scopes": ["repo"], "note_url": "http://vincent-jacques.net/PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4991'), ('content-length', '382'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"41f3600b4ddb741cd59a00a88321af92"'), ('date', 'Tue, 22 May 2012 18:27:36 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/authorizations/372294')] 10 | {"scopes":["repo"],"updated_at":"2012-05-22T18:27:36Z","app":{"url":"http://vincent-jacques.net/PyGithub","name":"Note created by PyGithub (API)"},"url":"https://api.github.com/authorizations/372294","token":"b7fd2a0346d9d590b1fad5e10971e8d29637a4ce","note":"Note created by PyGithub","note_url":"http://vincent-jacques.net/PyGithub","created_at":"2012-05-22T18:27:36Z","id":372294} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Exceptions.testJSONParseError.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'User-Agent': 'PyGithub/Python', 'Authorization': 'Basic login_and_password_removed'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '2'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Accept-Encoding'), ('content-length', '1299'), ('server', 'GitHub.com'), ('last-modified', 'Fri, 17 May 2013 12:09:51 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '60'), ('etag', '"de9347ae9c0c83b44d6c81d05aba4877"'), ('cache-control', 'public, max-age=60, s-maxage=60'), ('date', 'Fri, 17 May 2013 12:23:52 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8')] 10 | {"login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2F 11 | -------------------------------------------------------------------------------- /doc/examples/Milestone.rst: -------------------------------------------------------------------------------- 1 | Milestone 2 | ========== 3 | 4 | Get Milestone list 5 | ------------------ 6 | 7 | .. code-block:: python 8 | 9 | >>> repo = g.get_repo('PyGithub/PyGithub') 10 | >>> open_milestones = repo.get_milestones(state='open') 11 | >>> for milestone in open_milestones: 12 | ... print(milestone) 13 | ... 14 | Milestone(number=1) 15 | Milestone(number=2) 16 | 17 | Get Milestone 18 | ------------- 19 | 20 | .. code-block:: python 21 | 22 | >>> repo = g.get_repo('PyGithub/PyGithub') 23 | >>> repo.get_milestone(number=1) 24 | Milestone(number=1) 25 | 26 | Create Milestone 27 | ---------------- 28 | 29 | .. code-block:: python 30 | 31 | >>> repo = g.get_repo('PyGithub/PyGithub') 32 | >>> repo.create_milestone(title='New Milestone') 33 | Milestone(number=1) 34 | 35 | Create Milestone with State and Description 36 | ------------------------------------------- 37 | 38 | .. code-block:: python 39 | 40 | >>> repo = g.get_repo('PyGithub/PyGithub') 41 | >>> repo.create_milestone(title='New Milestone', state='open', description='Milestone description') 42 | Milestone(number=1) 43 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testBadSubscribePubSubHubbub.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /hub 6 | {'Content-Type': 'multipart/form-data; boundary=----------------------------3c3ba8b523b2', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | ------------------------------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-- 8 | 422 9 | [('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')] 10 | {"message":"Invalid event: \"non-existing-event\""} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/NamedUser.testAttributesOfOtherUser.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/nvie 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '598'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"66a516a2007fb7df8bbb3f9cc7cb2da8"'), ('date', 'Fri, 18 May 2012 19:46:37 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"public_gists":16,"type":"User","hireable":false,"company":"3rd Cloud","url":"https://api.github.com/users/nvie","gravatar_id":"c5a7f21b46df698f3db31c37ed0cf55a","bio":null,"followers":296,"blog":"http://nvie.com","avatar_url":"https://secure.gravatar.com/avatar/c5a7f21b46df698f3db31c37ed0cf55a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"nvie","email":"vincent@3rdcloud.com","public_repos":61,"html_url":"https://github.com/nvie","name":"Vincent Driessen","created_at":"2009-05-12T21:19:38Z","location":"Netherlands","id":83844,"following":41,"node_id":"MDQ6VXNlcjgzODQ0","twitter_username":"nvie"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitTree.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/trees 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"tree": [{"content": "File created by PyGithub", "path": "Foobar.txt", "type": "blob", "mode": "100644"}]} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4937'), ('content-length', '382'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0446b5f676814b5801ab6744ef9b59f7"'), ('date', 'Sun, 27 May 2012 05:48:14 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/trees/41cf8c178c636a018d537cb20daae09391efd70b')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/trees/41cf8c178c636a018d537cb20daae09391efd70b","sha":"41cf8c178c636a018d537cb20daae09391efd70b","tree":[{"type":"blob","url":"https://api.github.com/repos/jacquev6/PyGithub/git/blobs/73a1c7f17aa0ad5d7cbb5a8ca033ce47d3d23197","size":24,"path":"Foobar.txt","sha":"73a1c7f17aa0ad5d7cbb5a8ca033ce47d3d23197","mode":"100644"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testGetEmojis.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /emojis 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '757'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4993'), ('server', 'nginx'), ('connection', 'keep-alive'), ('etag', '"cc8e8df5d003cd489fd90931fa7f751a"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Fri, 21 Dec 2012 19:54:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"+1": "https://github.global.ssl.fastly.net/images/icons/emoji/+1.png?v5", "-1": "https://github.global.ssl.fastly.net/images/icons/emoji/-1.png?v5", "100": "https://github.global.ssl.fastly.net/images/icons/emoji/100.png?v5", "1234": "https://github.global.ssl.fastly.net/images/icons/emoji/1234.png?v5", "8ball": "https://github.global.ssl.fastly.net/images/icons/emoji/8ball.png?v5", "a": "https://github.global.ssl.fastly.net/images/icons/emoji/a.png?v5", "ab": "https://github.global.ssl.fastly.net/images/icons/emoji/ab.png?v5"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testJWTAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Bearer jwt_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '623'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0e3990a84c08ccd728a27dbe549d4f86"'), ('date', 'Sat, 26 May 2012 09:34:29 GMT'), ('x-oauth-scopes', ''), ('content-type', 'application/json; charset=utf-8'), ('x-accepted-oauth-scopes', 'user')] 10 | {"type":"User","company":"Criteo","location":"Paris, France","hireable":false,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","bio":"","following":24,"blog":"http://vincent-jacques.net","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","followers":13,"html_url":"https://github.com/jacquev6","url":"https://api.github.com/users/jacquev6","name":"Vincent Jacques","login":"jacquev6","public_repos":11,"public_gists":1,"email":"vincent@vincent-jacques.net","id":327146,"created_at":"2010-07-09T06:10:06Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitTreeWithSha.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/trees 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"tree": [{"path": "Barbaz.txt", "type": "blob", "mode": "100644", "sha": "5dd930f591cd5188e9ea7200e308ad355182a1d8"}]} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4997'), ('content-length', '381'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f33782d7031ff19c5301bb52068533cf"'), ('date', 'Fri, 01 Jun 2012 17:51:04 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/trees/fae707821159639589bf94f3fb0a7154ec5d441b')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/trees/fae707821159639589bf94f3fb0a7154ec5d441b","sha":"fae707821159639589bf94f3fb0a7154ec5d441b","tree":[{"type":"blob","url":"https://api.github.com/repos/jacquev6/PyGithub/git/blobs/5dd930f591cd5188e9ea7200e308ad355182a1d8","sha":"5dd930f591cd5188e9ea7200e308ad355182a1d8","size":0,"path":"Barbaz.txt","mode":"100644"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testAppAuthTokenAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Bearer jwt_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '623'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0e3990a84c08ccd728a27dbe549d4f86"'), ('date', 'Sat, 26 May 2012 09:34:29 GMT'), ('x-oauth-scopes', ''), ('content-type', 'application/json; charset=utf-8'), ('x-accepted-oauth-scopes', 'user')] 10 | {"type":"User","company":"Criteo","location":"Paris, France","hireable":false,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","bio":"","following":24,"blog":"http://vincent-jacques.net","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","followers":13,"html_url":"https://github.com/jacquev6","url":"https://api.github.com/users/jacquev6","name":"Vincent Jacques","login":"jacquev6","public_repos":11,"public_gists":1,"email":"vincent@vincent-jacques.net","id":327146,"created_at":"2010-07-09T06:10:06Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testOAuthAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '623'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0e3990a84c08ccd728a27dbe549d4f86"'), ('date', 'Sat, 26 May 2012 09:34:29 GMT'), ('x-oauth-scopes', ''), ('content-type', 'application/json; charset=utf-8'), ('x-accepted-oauth-scopes', 'user')] 10 | {"type":"User","company":"Criteo","location":"Paris, France","hireable":false,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","bio":"","following":24,"blog":"http://vincent-jacques.net","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","followers":13,"html_url":"https://github.com/jacquev6","url":"https://api.github.com/users/jacquev6","name":"Vincent Jacques","login":"jacquev6","public_repos":11,"public_gists":1,"email":"vincent@vincent-jacques.net","id":327146,"created_at":"2010-07-09T06:10:06Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testTokenAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '623'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0e3990a84c08ccd728a27dbe549d4f86"'), ('date', 'Sat, 26 May 2012 09:34:29 GMT'), ('x-oauth-scopes', ''), ('content-type', 'application/json; charset=utf-8'), ('x-accepted-oauth-scopes', 'user')] 10 | {"type":"User","company":"Criteo","location":"Paris, France","hireable":false,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","bio":"","following":24,"blog":"http://vincent-jacques.net","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","followers":13,"html_url":"https://github.com/jacquev6","url":"https://api.github.com/users/jacquev6","name":"Vincent Jacques","login":"jacquev6","public_repos":11,"public_gists":1,"email":"vincent@vincent-jacques.net","id":327146,"created_at":"2010-07-09T06:10:06Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testCreateComment.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/comments 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4996'), ('content-length', '506'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"08cea7c821f6f3378e38921a9e7bc05e"'), ('date', 'Sun, 20 May 2012 11:46:43 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/issues/comments/5808311')] 10 | {"updated_at":"2012-05-20T11:46:42Z","body":"Comment created by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/comments/5808311","created_at":"2012-05-20T11:46:42Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"id":5808311} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Migration.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /user/migrations/25320/archive 6 | {'Accept': 'application/vnd.github.wyandotte-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 13 Sep 2018 20:14:05 GMT'), ('Content-Type', 'application/octet-stream'), ('Status', '204 No Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4971'), ('X-RateLimit-Reset', '1536871398'), ('X-GitHub-Media-Type', 'github.wyandotte-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-Runtime-rack', '0.083770'), ('X-GitHub-Request-Id', 'F9FA:20FB:A7EA64:165BB04:5B9AC50C')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Milestone.testEditWithMinimalParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones/1 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"title": "Title edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4954'), ('content-length', '599'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"df00dd4d1183f48c313b9cf04330623b"'), ('date', 'Sat, 19 May 2012 10:29:02 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"closed_issues":0,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/5","due_on":"2012-06-15T07:00:00Z","creator":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"number":5,"open_issues":0,"title":"Title edited by PyGithub","created_at":"2012-05-19T10:24:13Z","state":"open","description":"Description created by PyGithub","id":121463} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetLabels.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/labels 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4944'), ('content-length', '695'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"a35ac34bf5089a20b90cd0bb34001fa3"'), ('date', 'Sun, 27 May 2012 07:05:48 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Refactoring","name":"Refactoring","color":"0b02e1"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Public+interface","name":"Public interface","color":"d7e102"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Functionalities","name":"Functionalities","color":"e102d8"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Project+management","name":"Project management","color":"444444"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Question","name":"Question","color":"02e10c"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testRemoveInvitation.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/invitations/17285388 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4992'), ('x-github-media-type', 'github.v3; format=json'), ('x-content-type-options', 'nosniff'), ('content-security-policy', "default-src 'none'"), ('access-control-expose-headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('vary', 'Accept-Encoding'), ('x-accepted-oauth-scopes', ''), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-oauth-scopes', 'public_repo, repo:status'), ('date', 'Tue, 02 Jul 2019 04:13:39 GMT'), ('x-frame-options', 'deny'), ('access-control-allow-origin', '*'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('content-type', 'application/octet-stream'), ('x-xss-protection', '1; mode=block'), ('x-ratelimit-reset', '1562044419')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Migration.testUnlockRepo.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /user/migrations/25320/repos/sample-repo/lock 6 | {'Accept': 'application/vnd.github.wyandotte-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 13 Sep 2018 20:18:24 GMT'), ('Content-Type', 'application/octet-stream'), ('Status', '204 No Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4966'), ('X-RateLimit-Reset', '1536871398'), ('X-GitHub-Media-Type', 'github.wyandotte-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-Runtime-rack', '0.123605'), ('X-GitHub-Request-Id', '1EA2:20FA:80B1CA:128FAE1:5B9AC610')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/RepositoryKey.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/lra/mackup/keys/21870881 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4941'), ('x-github-media-type', 'github.v3; format=json'), ('x-content-type-options', 'nosniff'), ('content-security-policy', "default-src 'none'"), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'D0B4:6161:CBE73FE:F6C4EF4:58AD4917'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('access-control-allow-origin', '*'), ('x-ratelimit-limit', '5000'), ('x-xss-protection', '1; mode=block'), ('x-served-by', '52437fedc85beec8da3449496900fb9a'), ('date', 'Wed, 22 Feb 2017 08:17:27 GMT'), ('x-frame-options', 'deny'), ('x-oauth-scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user'), ('x-accepted-oauth-scopes', ''), ('x-ratelimit-reset', '1487754126')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Branch.testEditProtectionPushRestrictionsWithUserOwnedBranch.txt: -------------------------------------------------------------------------------- 1 | https 2 | PUT 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/branches/integrations/protection 6 | {'Authorization': 'Basic login_and_password_removed', 'Content-Type': 'application/json', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.luke-cage-preview+json'} 7 | {"restrictions": {"apps": [], "users": ["jacquev6"], "teams": []}, "required_pull_request_reviews": null, "required_status_checks": null, "enforce_admins": null, "allow_force_pushes": null, "allow_fork_syncing": null, "lock_branch": null, "required_conversation_resolution": null, "required_linear_history": null, "block_creations": null, "allow_deletions": null } 8 | 422 9 | [('status', '422 Unprocessable Entity'), ('x-ratelimit-remaining', '4994'), ('content-length', '0'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e0dc2dfc56971f4a36de1216356ea98b"'), ('date', 'Sat, 05 May 2018 06:05:54 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"documentation_url":"https://developer.github.com/v3/repos/branches/#update-branch-protection","message":"Validation Failed","errors":["Only organization repositories can have users and team restrictions"]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testGetHook.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /hooks/activecollab 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('x-github-request-id', 'b3cd8329-7f33-4611-84d1-4e2ecfd91812'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, Accept-Encoding'), ('content-length', '191'), ('server', 'GitHub.com'), ('last-modified', 'Wed, 04 Sep 2013 18:03:57 GMT'), ('x-ratelimit-limit', '5000'), ('etag', '"678dd8e392d70d3a284c3d47221ec6f0"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Wed, 11 Sep 2013 21:10:37 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1378937437')] 10 | {"name":"activecollab","events":["push"],"supported_events":["push"],"schema":[["string","url"],["string","token"],["string","project_id"],["string","milestone_id"],["string","category_id"]]} 11 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | default_language_version: 2 | python: python3 3 | 4 | repos: 5 | - repo: https://github.com/pre-commit/pre-commit-hooks 6 | rev: v4.5.0 7 | hooks: 8 | - id: end-of-file-fixer 9 | - id: trailing-whitespace 10 | - id: check-symlinks 11 | - id: destroyed-symlinks 12 | - id: mixed-line-ending 13 | args: 14 | - "--fix=lf" 15 | 16 | - repo: https://github.com/asottile/pyupgrade 17 | rev: v3.15.0 18 | hooks: 19 | - id: pyupgrade 20 | args: ["--py37-plus"] 21 | 22 | - repo: https://github.com/astral-sh/ruff-pre-commit 23 | rev: v0.1.7 24 | hooks: 25 | - id: ruff 26 | args: 27 | - "--fix" 28 | - "--fixable=ALL" 29 | - "--exit-non-zero-on-fix" 30 | 31 | - repo: https://github.com/codespell-project/codespell 32 | rev: v2.2.6 33 | hooks: 34 | - id: codespell 35 | additional_dependencies: [tomli] 36 | 37 | - repo: https://github.com/PyCQA/docformatter 38 | rev: v1.7.5 39 | hooks: 40 | - id: docformatter 41 | additional_dependencies: [tomli] 42 | args: ["--in-place"] 43 | 44 | - repo: https://github.com/psf/black 45 | rev: 23.12.0 46 | hooks: 47 | - id: black 48 | -------------------------------------------------------------------------------- /doc/utilities.rst: -------------------------------------------------------------------------------- 1 | Utilities 2 | ========= 3 | 4 | Authentication 5 | -------------- 6 | 7 | .. autoclass:: github.Auth.Login 8 | .. autoclass:: github.Auth.Token 9 | .. autoclass:: github.Auth.JWT 10 | .. autoclass:: github.Auth.AppAuth 11 | .. autoclass:: github.Auth.AppAuthToken 12 | .. autoclass:: github.Auth.AppInstallationAuth 13 | .. autoclass:: github.Auth.AppUserAuth 14 | .. autoclass:: github.Auth.NetrcAuth 15 | 16 | Logging 17 | ------- 18 | 19 | .. autofunction:: github.enable_console_debug_logging 20 | 21 | Error Handling 22 | -------------- 23 | 24 | .. automodule:: github.GithubException 25 | 26 | Default argument 27 | ---------------- 28 | 29 | :const:`github.NotSet` is a special value for arguments you don't want to provide. You should not have to manipulate it directly, because it's the default value of all parameters accepting it. Just note that it is different from :const:`None`, which is an allowed value for some parameters. 30 | 31 | Pagination 32 | ---------- 33 | 34 | .. autoclass:: github.PaginatedList.PaginatedList() 35 | 36 | Input classes 37 | ------------- 38 | 39 | .. autoclass:: github.InputFileContent.InputFileContent 40 | .. autoclass:: github.InputGitAuthor.InputGitAuthor 41 | .. autoclass:: github.InputGitTreeElement.InputGitTreeElement 42 | -------------------------------------------------------------------------------- /tests/ReplayData/Branch.testEditProtectionDismissalUsersWithUserOwnedBranch.txt: -------------------------------------------------------------------------------- 1 | https 2 | PUT 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/branches/integrations/protection 6 | {'Authorization': 'Basic login_and_password_removed', 'Content-Type': 'application/json', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.luke-cage-preview+json'} 7 | {"restrictions": null, "required_pull_request_reviews": {"dismissal_restrictions": {"users": ["jacquev6"]}}, "required_status_checks": null, "enforce_admins": null, "allow_force_pushes": null, "allow_fork_syncing": null, "lock_branch": null, "required_conversation_resolution": null, "required_linear_history": null, "block_creations": null, "allow_deletions": null } 8 | 422 9 | [('status', '422 Unprocessable Entity'), ('x-ratelimit-remaining', '4994'), ('content-length', '0'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e0dc2dfc56971f4a36de1216356ea98b"'), ('date', 'Sun, 13 May 2018 10:42:14 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"documentation_url":"https://developer.github.com/v3/repos/branches/#update-branch-protection","message":"Validation Failed","errors":["Only organization repositories can have users and team restrictions"]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testEditWithoutArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4996'), ('content-length', '716'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"a9ca2dd89f69da85bebd949477894af0"'), ('date', 'Fri, 11 May 2012 09:07:56 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"owned_private_repos":0,"private_gists":0,"type":"Organization","following":0,"company":null,"html_url":"https://github.com/BeaverSoftware","blog":null,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","followers":0,"url":"https://api.github.com/orgs/BeaverSoftware","public_repos":2,"login":"BeaverSoftware","collaborators":0,"email":null,"disk_usage":112,"plan":{"private_repos":0,"space":307200,"name":"free"},"created_at":"2012-02-09T19:20:12Z","name":null,"total_private_repos":0,"billing_email":"BeaverSoftware@vincent-jacques.net","public_gists":0,"id":1424031,"location":"Paris, France"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateMilestoneWithMinimalArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"title": "Milestone also created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4940'), ('content-length', '562'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"575796ba6077c16fdc79f4d38885aa5f"'), ('date', 'Sun, 27 May 2012 05:41:34 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/milestones/6')] 10 | {"creator":{"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},"closed_issues":0,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/6","number":6,"title":"Milestone also created by PyGithub","due_on":null,"open_issues":0,"created_at":"2012-05-27T05:41:34Z","state":"open","description":null,"id":124480} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/BadAttributes.testBadSimpleAttributeInList.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /hooks/activecollab 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4969'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('x-github-request-id', 'fd44f8b6-d47d-44c5-a365-cd7bf9569c88'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, Accept-Encoding'), ('content-length', '191'), ('server', 'GitHub.com'), ('last-modified', 'Wed, 04 Sep 2013 18:03:57 GMT'), ('x-ratelimit-limit', '5000'), ('etag', '"678dd8e392d70d3a284c3d47221ec6f0"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Thu, 12 Sep 2013 08:31:46 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1378976739')] 10 | {"name":"activecollab","events":["push", 42],"supported_events":["push"],"schema":[["string","url"],["string","token"],["string","project_id"],["string","milestone_id"],["string","category_id"]]} 11 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | on: 3 | push: 4 | branches: 5 | - main 6 | - release-v* 7 | pull_request: 8 | merge_group: 9 | 10 | jobs: 11 | mypy: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up Python 16 | uses: actions/setup-python@v4 17 | with: 18 | python-version: "3.x" 19 | - run: | 20 | python -m pip install --upgrade pip 21 | pip install -e . 22 | pip install -r requirements/types.txt 23 | - uses: liskin/gh-problem-matcher-wrap@v2 24 | with: 25 | action: add 26 | linters: mypy 27 | - run: mypy --show-column-numbers github tests 28 | 29 | pre-commit: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@v3 33 | - uses: actions/setup-python@v4 34 | with: 35 | python-version: "3.x" 36 | - uses: pre-commit/action@v3.0.0 37 | 38 | docs: 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | - uses: actions/setup-python@v4 43 | with: 44 | python-version: "3.8" 45 | 46 | - run: pip install -r requirements/docs.txt 47 | - run: pip install -e . 48 | - run: sphinx-build doc build 49 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequest.testGetIssueComment.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub/issues/comments/8387331 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '517'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4960'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 08 Sep 2012 12:57:51 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"5494519596414fbfe208a0b6d193e8f9"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sat, 08 Sep 2012 13:03:46 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"body":"Issue comment created by PyGithub","user":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","url":"https://api.github.com/users/jacquev6","id":327146},"created_at":"2012-09-08T12:57:51Z","updated_at":"2012-09-08T12:57:51Z","url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments/8387331","id":8387331} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequest.testGetIssueComments.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub/issues/31/comments 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4968'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '519'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 08 Sep 2012 12:57:51 GMT'), ('connection', 'keep-alive'), ('etag', '"5494519596414fbfe208a0b6d193e8f9"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Sat, 08 Sep 2012 12:59:56 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"body":"Issue comment created by PyGithub","user":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","url":"https://api.github.com/users/jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png"},"created_at":"2012-09-08T12:57:51Z","updated_at":"2012-09-08T12:57:51Z","url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments/8387331","id":8387331}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Logging.testLoggingWithBaseUrl.txt: -------------------------------------------------------------------------------- 1 | http 2 | GET 3 | my.enterprise.com 4 | None 5 | /my/prefix/users/jacquev6 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '628'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept'), ('x-ratelimit-remaining', '4989'), ('server', 'nginx'), ('last-modified', 'Tue, 25 Sep 2012 07:42:42 GMT'), ('connection', 'keep-alive'), ('etag', '"9bd085221a16b6d2ea95e72634c3c1ac"'), ('cache-control', 'public, max-age=60, s-maxage=60'), ('date', 'Tue, 25 Sep 2012 20:38:56 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","html_url":"https://github.com/jacquev6","login":"jacquev6","followers":14,"company":"Criteo","created_at":"2010-07-09T06:10:06Z","email":"vincent@vincent-jacques.net","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","public_gists":3,"bio":"","following":29,"name":"Vincent Jacques","blog":"http://vincent-jacques.net","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146,"public_repos":13,"location":"Paris, France","url":"https://api.github.com/users/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Logging.testLoggingWithoutAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '628'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept'), ('x-ratelimit-remaining', '4989'), ('server', 'nginx'), ('last-modified', 'Tue, 25 Sep 2012 07:42:42 GMT'), ('connection', 'keep-alive'), ('etag', '"9bd085221a16b6d2ea95e72634c3c1ac"'), ('cache-control', 'public, max-age=60, s-maxage=60'), ('date', 'Tue, 25 Sep 2012 20:38:56 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","html_url":"https://github.com/jacquev6","login":"jacquev6","followers":14,"company":"Criteo","created_at":"2010-07-09T06:10:06Z","email":"vincent@vincent-jacques.net","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","public_gists":3,"bio":"","following":29,"name":"Vincent Jacques","blog":"http://vincent-jacques.net","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146,"public_repos":13,"location":"Paris, France","url":"https://api.github.com/users/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/CommitComment.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/comments/1361949 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '713'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"97ffd9ff8370f4f284873a6397d7cafd"'), ('date', 'Tue, 22 May 2012 18:43:17 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"updated_at":"2012-05-22T18:43:17Z","position":null,"body":"Comment edited by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/comments/1361949","commit_id":"6945921c529be14c3a8f566dd1e483674516d46d","created_at":"2012-05-22T18:40:18Z","path":null,"line":null,"user":{"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","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146},"id":1361949,"html_url":"https://github.com/jacquev6/PyGithub/commit/6945921c529be14c3a8f566dd1e483674516d46d#commitcomment-1361949"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testEditWithoutParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4996'), ('content-length', '748'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"771af112ee4f9ad5858f5c9b5141b319"'), ('date', 'Sat, 19 May 2012 10:41:03 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"assignee":null,"updated_at":"2012-05-19T10:38:23Z","body":null,"url":"https://api.github.com/repos/jacquev6/PyGithub/issues/28","comments":0,"number":28,"title":"Issue created by PyGithub","pull_request":{"patch_url":null,"diff_url":null,"html_url":null},"closed_at":null,"labels":[],"closed_by":null,"html_url":"https://github.com/jacquev6/PyGithub/issues/28","created_at":"2012-05-19T10:38:23Z","state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"id":4653757,"milestone":null} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Milestone.testEditWithAllParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones/1 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"due_on": "2012-06-16", "state": "closed", "description": "Description edited by PyGithub", "title": "Title edited twice by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4946'), ('content-length', '606'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"ac9f76c61e1fe0e76cd26e77e59d5797"'), ('date', 'Sat, 19 May 2012 10:30:15 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/5","due_on":"2012-06-16T07:00:00Z","creator":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":327146},"number":5,"open_issues":0,"title":"Title edited twice by PyGithub","closed_issues":0,"created_at":"2012-05-19T10:24:13Z","state":"closed","description":"Description edited by PyGithub","id":121463} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testBasicAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4995'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f1a68180387d296f308d6a01917e1799"'), ('date', 'Sat, 26 May 2012 09:34:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","disk_usage":16852,"public_repos":11,"url":"https://api.github.com/users/jacquev6","hireable":false,"plan":{"private_repos":5,"collaborators":1,"name":"micro","space":614400},"public_gists":1,"bio":"","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","private_gists":5,"collaborators":0,"company":"Criteo","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","total_private_repos":5,"blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","followers":13,"name":"Vincent Jacques","owned_private_repos":5,"created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24,"html_url":"https://github.com/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Authentication.testLoginAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4995'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f1a68180387d296f308d6a01917e1799"'), ('date', 'Sat, 26 May 2012 09:34:28 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","disk_usage":16852,"public_repos":11,"url":"https://api.github.com/users/jacquev6","hireable":false,"plan":{"private_repos":5,"collaborators":1,"name":"micro","space":614400},"public_gists":1,"bio":"","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","private_gists":5,"collaborators":0,"company":"Criteo","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","total_private_repos":5,"blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","followers":13,"name":"Vincent Jacques","owned_private_repos":5,"created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24,"html_url":"https://github.com/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Notification.testMarkAsRead.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /notifications/threads/397777914 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 205 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 18 Oct 2018 18:46:59 GMT'), ('Content-Type', 'text/plain;charset=utf-8'), ('Content-Length', '0'), ('Status', '205 Reset Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4983'), ('X-RateLimit-Reset', '1539890344'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:public_key, admin:repo_hook, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', 'notifications, repo'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'B14A:4C25:2AC483C:58CB194:5BC8D523')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testInviteUserWithBoth.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4962'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"fc78d67f262cad756e42354c78ecea4e"'), ('date', 'Tue, 28 Aug 2018 00:16:42 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"public_repos":11,"type":"User","disk_usage":17080,"hireable":false,"blog":"http://vincent-jacques.net","url":"https://api.github.com/users/jacquev6","bio":"","plan":{"collaborators":1,"private_repos":5,"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","total_private_repos":5,"public_gists":2,"company":"Criteo","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","owned_private_repos":5,"private_gists":5,"collaborators":0,"email":"vincent@vincent-jacques.net","followers":13,"name":"Vincent Jacques","created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24,"html_url":"https://github.com/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitTag.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/tags 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"message": "Tag created by PyGithub", "tag": "TaggedByPyGithub", "type": "commit", "object": "0b820628236ab8bab3890860fc414fa757ca15f4"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4925'), ('content-length', '512'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"9a9c1f293329ee4c63e8cfb08772e3a1"'), ('date', 'Sun, 27 May 2012 05:56:08 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/tags/5ba561eaa2b7ca9015662510157b15d8f3b0232a')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/tags/5ba561eaa2b7ca9015662510157b15d8f3b0232a","message":"Tag created by PyGithub","tag":"TaggedByPyGithub","object":{"type":"commit","url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/0b820628236ab8bab3890860fc414fa757ca15f4","sha":"0b820628236ab8bab3890860fc414fa757ca15f4"},"tagger":{"email":"github.com@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-26T22:56:07-07:00"},"sha":"5ba561eaa2b7ca9015662510157b15d8f3b0232a"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testGetHookDeliveries.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /hooks/257993/deliveries 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('x-github-request-id', 'b3cd8329-7f33-4611-84d1-4e2ecfd91812'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, Accept-Encoding'), ('content-length', '191'), ('server', 'GitHub.com'), ('last-modified', 'Wed, 04 Sep 2013 18:03:57 GMT'), ('x-ratelimit-limit', '5000'), ('etag', '"678dd8e392d70d3a284c3d47221ec6f0"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Wed, 11 Sep 2013 21:10:37 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1378937437')] 10 | [{"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com"}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testEditWithoutArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /user 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4996'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"811fb4d5df8bae5b1ef7d63537891a1c"'), ('date', 'Tue, 08 May 2012 10:05:35 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"private_gists":5,"collaborators":0,"type":"User","bio":"","url":"https://api.github.com/users/jacquev6","public_repos":10,"followers":13,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","total_private_repos":5,"disk_usage":16692,"plan":{"collaborators":1,"space":614400,"name":"micro","private_repos":5},"html_url":"https://github.com/jacquev6","owned_private_repos":5,"login":"jacquev6","blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","created_at":"2010-07-09T06:10:06Z","company":"Criteo","location":"Paris, France","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","following":24,"name":"Vincent Jacques","public_gists":1,"hireable":false,"id":327146} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testUnlock.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/lock 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Fri, 03 May 2019 09:44:22 GMT'), ('Content-Type', 'application/octet-stream'), ('Status', '204 No Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4990'), ('X-RateLimit-Reset', '1556880113'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'C373:6113:E26177:1C113F4:5CCC0D75')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/SpecificExceptions.test2FARequired.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 401 9 | [('date', 'Fri, 25 Oct 2019 07:56:02 GMT'), ('content-type', 'application/json; charset=utf-8'), ('content-length', '160'), ('server', 'GitHub.com'), ('status', '401 Unauthorized'), ('x-github-otp', 'required; app'), ('x-github-media-type', 'github.v3; format=json'), ('x-ratelimit-limit', '60'), ('x-ratelimit-remaining', '58'), ('x-ratelimit-reset', '1571993689'), ('access-control-expose-headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('access-control-allow-origin', '*'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('x-frame-options', 'deny'), ('x-content-type-options', 'nosniff'), ('x-xss-protection', '1; mode=block'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('content-security-policy', "default-src 'none'"), ('x-github-request-id', 'B376:7075:202D9C:250D5E:5DB2AA92')] 10 | {"message":"Must specify two-factor authentication OTP code.", "documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testAttributes.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"79f748546e5fc4492505a70de6542183"'), ('date', 'Tue, 08 May 2012 09:51:20 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"public_repos":10,"type":"User","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","followers":13,"bio":"","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","disk_usage":16692,"plan":{"private_repos":5,"space":614400,"name":"micro","collaborators":1},"html_url":"https://github.com/jacquev6","blog":"http://vincent-jacques.net","login":"jacquev6","email":"vincent@vincent-jacques.net","created_at":"2010-07-09T06:10:06Z","company":"Criteo","location":"Paris, France","total_private_repos":5,"public_gists":1,"following":24,"name":"Vincent Jacques","id":327146,"owned_private_repos":5,"private_gists":5,"collaborators":0,"hireable":false,"node_id":"MDQ6VXNlcjMyNzE0Ng==","two_factor_authentication":true} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/NamedUser.setUp.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /users/jacquev6 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4960'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"2b9d2167029cc33666d02e0b0e95f2b9"'), ('date', 'Sat, 26 May 2012 11:08:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"type":"User","disk_usage":17080,"public_gists":2,"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","public_repos":11,"hireable":false,"private_gists":5,"plan":{"private_repos":5,"collaborators":1,"name":"micro","space":614400},"bio":"","company":"Criteo","blog":"http://vincent-jacques.net","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","total_private_repos":5,"email":"vincent@vincent-jacques.net","collaborators":0,"followers":13,"name":"Vincent Jacques","owned_private_repos":5,"created_at":"2010-07-09T06:10:06Z","suspended_at":"2013-08-10T07:11:07Z","location":"Paris, France","id":327146,"following":24,"html_url":"https://github.com/jacquev6", "node_id":"MDQ6VXNlcjMyNzE0Ng=="} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue54.testConversion.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/TestRepo/git/commits/73f320ae06cd565cf38faca34b6a482addfc721b 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '676'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4984'), ('server', 'nginx/1.0.13'), ('last-modified', 'Fri, 13 Jul 2012 18:47:10 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"ab832024b149674b5210a1a3b146575c"'), ('cache-control', 'private, max-age=60'), ('date', 'Fri, 13 Jul 2012 19:06:44 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"committer":{"email":"vincent@vincent-jacques.net","date":"2012-07-13T11:47:10-07:00","name":"Vincent Jacques"},"message":"Test commit created around Fri, 13 Jul 2012 18:43:21 GMT, that is vendredi 13 juillet 2012 20:43:21 GMT+2\n","sha":"73f320ae06cd565cf38faca34b6a482addfc721b","tree":{"sha":"52fe1ba4ac2b979c0a8fbeb9f87c1b1c9f177520","url":"https://api.github.com/repos/jacquev6/TestRepo/git/trees/52fe1ba4ac2b979c0a8fbeb9f87c1b1c9f177520"},"author":{"email":"vincent@vincent-jacques.net","date":"2012-07-13T11:47:10-07:00","name":"Vincent Jacques"},"parents":[],"url":"https://api.github.com/repos/jacquev6/TestRepo/git/commits/73f320ae06cd565cf38faca34b6a482addfc721b"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequest.testCreateIssueComment.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub/issues/31/comments 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Issue comment created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('content-length', '517'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-remaining', '4976'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('location', 'https://api.github.com/repos/PyGithub/PyGithub/issues/comments/8387331'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Sat, 08 Sep 2012 12:57:51 GMT'), ('etag', '"6d189ee4b6415276097b091d11a77ce0"'), ('content-type', 'application/json; charset=utf-8')] 10 | {"body":"Issue comment created by PyGithub","user":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","url":"https://api.github.com/users/jacquev6","id":327146},"created_at":"2012-09-08T12:57:51Z","updated_at":"2012-09-08T12:57:51Z","url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments/8387331","id":8387331} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testMarkNotificationsAsRead.txt: -------------------------------------------------------------------------------- 1 | https 2 | PUT 3 | api.github.com 4 | None 5 | /notifications 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"last_read_at": "2018-10-18T18:20:01Z"} 8 | 205 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 18 Oct 2018 18:41:54 GMT'), ('Content-Type', 'text/plain;charset=utf-8'), ('Content-Length', '0'), ('Status', '205 Reset Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4989'), ('X-RateLimit-Reset', '1539890344'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:public_key, admin:repo_hook, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', 'notifications, repo'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'B236:4C25:2ABE5CA:58BE030:5BC8D3F2')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/ReleaseAsset.testDelete.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /api/v3/repos/edhollandAL/PyGithub/releases/assets/16 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('content-length', '0'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-served-by', '4c8b2d4732c413f4b9aefe394bd65569'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"354bfbe5bc3193b117028111f8d7bf5d"'), ('access-control-allow-credentials', 'true'), ('status', '200 OK'), ('x-ratelimit-remaining', '4969'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '56BCFFD3:70D4:71AB7A0:553A014B'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('last-modified', 'Thu, 23 Apr 2015 10:29:48 GMT'), ('date', 'Fri, 24 Apr 2015 08:39:39 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1429867683')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Branch.testRemoveRequiredSignatures.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/branches/integrations/protection/required_signatures 6 | {'Accept': 'application/vnd.github.zzzax-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Sun, 21 Oct 2018 18:46:19 GMT'), ('Content-Type', 'application/octet-stream'), ('Status', '204 No Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4979'), ('X-RateLimit-Reset', '1540150652'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:public_key, admin:repo_hook, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.zzzax-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'AA48:4C25:3BECB3F:7CD7C22:5BCCC97A')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateMilestone.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"due_on": "2012-06-15T00:00:00Z", "state": "open", "description": "Description created by PyGithub", "title": "Milestone created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4958'), ('content-length', '604'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"bb5eb08c923020c102396cd0c9bfdbc5"'), ('date', 'Sat, 19 May 2012 10:24:13 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/milestones/5')] 10 | {"closed_issues":0,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/5","due_on":"2012-06-15T07:00:00Z","creator":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"number":5,"open_issues":0,"title":"Milestone created by PyGithub","created_at":"2012-05-19T10:24:13Z","state":"open","description":"Description created by PyGithub","id":121463} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Commit.testCreateStatusWithoutOptionalParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/statuses/1292bf0e22c796e91cc3d6e24b544aece8c21f2a 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"state": "pending"} 8 | 201 9 | [('status', '201 Created'), ('content-length', '523'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-remaining', '4979'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/statuses/277031'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Sat, 08 Sep 2012 11:27:12 GMT'), ('etag', '"7e28427673d50844a69c0871e5e39a69"'), ('content-type', 'application/json; charset=utf-8')] 10 | {"description":null,"created_at":"2012-09-08T11:27:12Z","target_url":null,"state":"pending","updated_at":"2012-09-08T11:27:12Z","url":"https://api.github.com/repos/jacquev6/PyGithub/statuses/277031","id":277031,"creator":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","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-user-420.png","id":327146}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testRemoveAutolink.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/autolinks/209611 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Tue, 02 Nov 2021 13:05:13 GMT'), ('X-OAuth-Scopes', 'admin:repo_hook, repo'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2021-11-09 12:40:40 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4941'), ('X-RateLimit-Reset', '1635859633'), ('X-RateLimit-Used', '59'), ('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, 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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'C120:10BD6:34C209:39806B:61813789')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetMembers.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/members 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('content-length', '886'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f7f3d1eaa1c0d14d590b09dbb439db2e"'), ('date', 'Sun, 27 May 2012 05:08:20 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/users/cjuniet","avatar_url":"https://secure.gravatar.com/avatar/197eed5292fd11c0277335c3524ccfd5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"197eed5292fd11c0277335c3524ccfd5","login":"cjuniet","id":1233553},{"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},{"url":"https://api.github.com/users/Lyloa","avatar_url":"https://secure.gravatar.com/avatar/1517ed584458ccf83e03f5d77d9699d7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1517ed584458ccf83e03f5d77d9699d7","login":"Lyloa","id":1131432}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testGetGitignoreTemplates.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /gitignore/templates 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '757'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4993'), ('server', 'nginx'), ('connection', 'keep-alive'), ('etag', '"cc8e8df5d003cd489fd90931fa7f751a"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Fri, 21 Dec 2012 19:54:21 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | ["Actionscript","Android","AppceleratorTitanium","Autotools","Bancha","C","C++","CFWheels","CMake","CSharp","CakePHP","Clojure","CodeIgniter","Compass","Concrete5","Coq","Delphi","Django","Drupal","Erlang","ExpressionEngine","Finale","ForceDotCom","FuelPHP","GWT","Go","Grails","Haskell","Java","Jboss","Jekyll","Joomla","Jython","Kohana","LaTeX","Leiningen","LemonStand","Lilypond","Lithium","Magento","Maven","Node","OCaml","Objective-C","Opa","OracleForms","Perl","PlayFramework","Python","Qooxdoo","Qt","R","Rails","RhodesRhomobile","Ruby","Scala","Sdcc","SeamGen","SketchUp","SugarCRM","Symfony","Symfony2","SymphonyCMS","Target3001","Tasm","Textpattern","TurboGears2","Unity","VB.Net","Waf","Wordpress","Yii","ZendFramework","gcov","nanoc","opencart"] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testGetOutsideCollaborators.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/outside_collaborators 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | null 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('content-length', '175'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"f7f3d1eaa1c0d14d590b09dbb439db2e"'), ('date', 'Sun, 28 Feb 2017 09:51:20 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"login": "octocat","id": 1,"avatar_url": "https://github.com/images/error/octocat_happy.gif","gravatar_id": "","url": "https://api.github.com/users/octocat","html_url": "https://github.com/octocat","followers_url": "https://api.github.com/users/octocat/followers","following_url": "https://api.github.com/users/octocat/following{/other_user}","gists_url": "https://api.github.com/users/octocat/gists{/gist_id}","starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url": "https://api.github.com/users/octocat/subscriptions","organizations_url": "https://api.github.com/users/octocat/orgs","repos_url": "https://api.github.com/users/octocat/repos","events_url": "https://api.github.com/users/octocat/events{/privacy}","received_events_url": "https://api.github.com/users/octocat/received_events","type": "User","site_admin": false}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateIssue.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"title": "Issue created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4935'), ('content-length', '748'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"26e2222fe8411843d3fd2b024d50c567"'), ('date', 'Sat, 19 May 2012 10:38:24 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/issues/28')] 10 | {"closed_by":null,"state":"open","user":{"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},"title":"Issue created by PyGithub","comments":0,"updated_at":"2012-05-19T10:38:23Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"closed_at":null,"body":null,"number":28,"milestone":null,"url":"https://api.github.com/repos/jacquev6/PyGithub/issues/28","assignee":null,"labels":[],"id":4653757,"html_url":"https://github.com/jacquev6/PyGithub/issues/28","created_at":"2012-05-19T10:38:23Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testDeleteReaction.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/reactions/85740167 6 | {'Accept': 'application/vnd.github.squirrel-girl-preview', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Date', 'Mon, 28 Sep 2020 20:23:03 GMT'), ('Server', 'GitHub.com'), ('Status', '204 No Content'), ('X-OAuth-Scopes', 'public_repo, repo:status, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.squirrel-girl-preview'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1601324668'), ('X-RateLimit-Used', '45'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('X-GitHub-Request-Id', 'AE16:FACE:CAD7D10:F1C172A:5F724627')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetMilestones.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/milestones 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4938'), ('content-length', '901'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"ed668d7695f9e5259aa7d9660a875e03"'), ('date', 'Sun, 27 May 2012 07:07:35 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"creator":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/2","number":2,"title":"Version 1.0: coherent public interface","due_on":"2012-06-04T07:00:00Z","open_issues":10,"created_at":"2012-03-08T12:22:28Z","state":"open","description":"Heavy rewrite to have:\r\n* a fully coherent public interface\r\n* usable stack-traces in case of exception\r\n* more explicit exceptions\r\n* more readable code (for library exploration, auto-completion in IDEs, etc.)\r\n\r\nSee working branch https://github.com/jacquev6/PyGithub/tree/topic/RewriteWithGeneratedCode","id":93547,"closed_issues":2}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testGetTopics.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/topics 6 | {'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.mercy-preview+json', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('content-length', '30'), ('x-runtime-rack', '0.081855'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"c34823528b2c41eadf247bcea3b7dabc"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('x-github-media-type', 'github.mercy-preview; format=json'), ('access-control-expose-headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '4C20:5398:FE4A88:26DA323:5AD7F450'), ('date', 'Thu, 19 Apr 2018 01:43:45 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1524105758')] 10 | {"names":["testing","github"]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Logging.testLoggingWithOAuthAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4993'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '628'), ('server', 'nginx'), ('last-modified', 'Tue, 25 Sep 2012 07:42:42 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c23ad6b5815fc3d6ec6341c4a47afe85"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Tue, 25 Sep 2012 20:36:54 GMT'), ('x-oauth-scopes', ''), ('content-type', 'application/json; charset=utf-8'), ('x-accepted-oauth-scopes', 'user')] 10 | {"type":"User","bio":"","html_url":"https://github.com/jacquev6","login":"jacquev6","followers":14,"company":"Criteo","blog":"http://vincent-jacques.net","public_repos":13,"created_at":"2010-07-09T06:10:06Z","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","email":"vincent@vincent-jacques.net","following":29,"name":"Vincent Jacques","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","hireable":false,"id":327146,"public_gists":3,"location":"Paris, France","url":"https://api.github.com/users/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Migration.testGetArchiveUrlWhenDeleted.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user/migrations/25320/archive 6 | {'Accept': 'application/vnd.github.wyandotte-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 404 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 13 Sep 2018 20:17:43 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '404 Not Found'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4969'), ('X-RateLimit-Reset', '1536871398'), ('X-GitHub-Media-Type', 'github.wyandotte-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-Runtime-rack', '0.048286'), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'D06B:20FA:80A9D5:128E928:5B9AC5E6')] 10 | {"message":"Not Found","documentation_url":"https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/CommitComment.testDeleteReaction.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/comments/1361949/reactions/85737646 6 | {'Accept': 'application/vnd.github.squirrel-girl-preview', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Date', 'Mon, 28 Sep 2020 19:55:51 GMT'), ('Server', 'GitHub.com'), ('Status', '204 No Content'), ('X-OAuth-Scopes', 'public_repo, repo:status, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.squirrel-girl-preview'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4959'), ('X-RateLimit-Reset', '1601324668'), ('X-RateLimit-Used', '41'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('X-GitHub-Request-Id', 'C96E:F313:162969A9:1A634C51:5F723FC7')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Migration.testGetArchiveUrlWhenNotExported.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user/migrations/25320/archive 6 | {'Accept': 'application/vnd.github.wyandotte-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 404 9 | [('Server', 'GitHub.com'), ('Date', 'Thu, 13 Sep 2018 20:05:39 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '404 Not Found'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4978'), ('X-RateLimit-Reset', '1536871398'), ('X-GitHub-Media-Type', 'github.wyandotte-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-Runtime-rack', '0.047402'), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', '87CF:20FB:A75E84:1648F66:5B9AC312')] 10 | {"message":"Not Found","documentation_url":"https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Organization.testDeleteHook.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /orgs/BeaverSoftware/hooks 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"config": {"url": "http://foobar.com"}, "name": "web"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4994'), ('content-length', '298'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"276d18854081948260c44cf645c54bd0"'), ('date', 'Sat, 19 May 2012 05:03:14 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/orgs/BeaverSoftware/hooks/257967')] 10 | {"updated_at":"2012-05-19T05:03:14Z","url":"https://api.github.com/orgs/BeaverSoftware/hooks/257967","config":{"url":"http://foobar.com"},"last_response":{"status":"unused","message":null,"code":null},"active":true,"events":["push"],"name":"web","created_at":"2012-05-19T05:03:14Z","id":257967} 11 | 12 | https 13 | DELETE 14 | api.github.com 15 | None 16 | /orgs/BeaverSoftware/hooks/257967 17 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 18 | None 19 | 204 20 | [('status', '204 No Content'), ('x-ratelimit-remaining', '4965'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d41d8cd98f00b204e9800998ecf8427e"'), ('date', 'Sat, 19 May 2012 07:26:55 GMT')] 21 | -------------------------------------------------------------------------------- /tests/ReplayData/Traffic.testGetReferrers.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jkufro/PyGithub/traffic/popular/referrers 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('Server', 'GitHub.com'), ('Date', 'Sun, 02 Dec 2018 17:25:02 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4997'), ('X-RateLimit-Reset', '1543775101'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('ETag', 'W/"033913cf8de0341149e2639c12d7a240"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'F3F4:56B2:D89E29:1E6E41C:5C04156D')] 10 | [{"referrer":"github.com","count":5,"uniques":1}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Commit.testCreateComment.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/comments 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4982'), ('content-length', '714'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"bd72e3550c9b90814f0be2b54ab2cc8e"'), ('date', 'Tue, 22 May 2012 18:40:18 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/comments/1361949')] 10 | {"updated_at":"2012-05-22T18:40:18Z","position":null,"body":"Comment created by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/comments/1361949","commit_id":"1292bf0e22c796e91cc3d6e24b544aece8c21f2a","created_at":"2012-05-22T18:40:18Z","path":null,"line":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146},"id":1361949,"html_url":"https://github.com/jacquev6/PyGithub/commit/1292bf0e22c796e91cc3d6e24b544aece8c21f2a#commitcomment-1361949"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/IssueComment.testDeleteReaction.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/comments/5808311/reactions/85743754 6 | {'Accept': 'application/vnd.github.squirrel-girl-preview', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Date', 'Mon, 28 Sep 2020 20:58:11 GMT'), ('Server', 'GitHub.com'), ('Status', '204 No Content'), ('X-OAuth-Scopes', 'public_repo, repo:status, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.squirrel-girl-preview'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4983'), ('X-RateLimit-Reset', '1601330202'), ('X-RateLimit-Used', '17'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('X-GitHub-Request-Id', '8F46:7327:16616BD7:1AB22028:5F724E63')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequestComment.testDeleteReaction.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/pulls/comments/886298/reactions/85750463 6 | {'Accept': 'application/vnd.github.squirrel-girl-preview', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Date', 'Mon, 28 Sep 2020 22:15:48 GMT'), ('Server', 'GitHub.com'), ('Status', '204 No Content'), ('X-OAuth-Scopes', 'public_repo, repo:status, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.squirrel-girl-preview'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4991'), ('X-RateLimit-Reset', '1601334930'), ('X-RateLimit-Used', '9'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('X-GitHub-Request-Id', '9B34:FACF:17050546:1B72222B:5F726093')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testCreateGitTagWithAllArguments.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/git/tags 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"tagger": {"date": "2008-07-09T16:13:30+12:00", "name": "John Doe", "email": "j.doe@vincent-jacques.net"}, "message": "Tag also created by PyGithub", "tag": "TaggedByPyGithub2", "type": "commit", "object": "526946197ae9da59c6507cacd13ad6f1cfb686ea"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4922'), ('content-length', '506'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"a7e5d9e4342e323fa513f880968b80f4"'), ('date', 'Sun, 27 May 2012 05:57:03 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/git/tags/f0e99a8335fbc84c53366c4a681118468f266625')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/git/tags/f0e99a8335fbc84c53366c4a681118468f266625","message":"Tag also created by PyGithub","tag":"TaggedByPyGithub2","object":{"type":"commit","url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/526946197ae9da59c6507cacd13ad6f1cfb686ea","sha":"526946197ae9da59c6507cacd13ad6f1cfb686ea"},"tagger":{"email":"j.doe@vincent-jacques.net","name":"John Doe","date":"2008-07-08T21:13:30-07:00"},"sha":"f0e99a8335fbc84c53366c4a681118468f266625"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Retry.testShouldNotRetryWhenStatusNotOnList.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/PyGithub/PyGithub 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 400 9 | [('Server', 'GitHub.com'), ('Date', 'Fri, 26 Oct 2018 06:02:42 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '400 Bad Request'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4970'), ('X-RateLimit-Reset', '1540536267'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('ETag', 'W/"3ffd69d4f4e7383eae948812b1eb72e5"'), ('X-OAuth-Scopes', 'repo'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.v3; param=star; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'F9D6:235E:3C00DD:772BC6:5BD2AE02')] 10 | {"error": "Bad Request"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testDeleteSecret.txt: -------------------------------------------------------------------------------- 1 | https 2 | DELETE 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/actions/secrets/secret_name 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Mon, 08 Mar 2021 05:16:00 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4992'), ('X-RateLimit-Reset', '1615184024'), ('X-RateLimit-Used', '8'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, 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', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'AFD4:3C6C:7E7FD:9D757:6045B310')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Traffic.testGetClones.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jkufro/PyGithub/traffic/clones 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('Server', 'GitHub.com'), ('Date', 'Sun, 02 Dec 2018 17:25:20 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4988'), ('X-RateLimit-Reset', '1543775101'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('ETag', 'W/"99f62fd904c91505ef4f1f8b89d22c08"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'F408:56B2:D8A13F:1E6EC1B:5C041580')] 10 | {"count":4,"uniques":4,"clones":[{"timestamp":"2018-11-27T00:00:00Z","count":4,"uniques":4}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testSearchIssues.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /legacy/issues/search/jacquev6/PyGithub/open/search 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '875'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4985'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"2e397de657b33283e77ef12a21326d0d"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 20:39:57 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"issues":[{"title":"Support new Search API","number":49,"user":"kukuts","html_url":"https://github.com/jacquev6/PyGithub/issues/49","labels":["Functionalities","RequestedByUser"],"body":"New API ported from v2 but i have trouble with adopting ask's library for v2 API to support v3 style for searching. \nhttp://developer.github.com/v3/search/\n\nIts not described in the page about parameters that search for repos API supports.\nThey are same as in v2 API, you can look them in ask's library.\nIn v2 was like that https://github.com/api/v2/json/repos/search/testing?start_page=2&language=Python\nIn v3 is https://api.github.com/legacy/repos/search/testing?start_page=2&language=Python","votes":0,"comments":2,"updated_at":"2012-06-25T12:31:14-07:00","gravatar_id":"9be6ba907be1740213b69422fdf52b57","position":1.0,"state":"open","created_at":"2012-06-21T05:27:38-07:00"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testLock.txt: -------------------------------------------------------------------------------- 1 | https 2 | PUT 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/lock 6 | {'Content-Type': 'application/json', 'Accept': 'application/vnd.github.sailor-v-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"lock_reason": "resolved"} 8 | 204 9 | [('Server', 'GitHub.com'), ('Date', 'Fri, 03 May 2019 09:42:52 GMT'), ('Content-Type', 'application/octet-stream'), ('Status', '204 No Content'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4993'), ('X-RateLimit-Reset', '1556880113'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', 'public_repo, repo'), ('X-GitHub-Media-Type', 'github.sailor-v-preview; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'C339:2746:A14FFE:15EFA60:5CCC0D1C')] 10 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testLegacySearchIssues.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /legacy/issues/search/jacquev6/PyGithub/open/search 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '875'), ('x-ratelimit-remaining', '4990'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1178425a2730e43d21323c7e130c863c"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Fri, 29 Jun 2012 11:38:23 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"issues":[{"number":49,"gravatar_id":"9be6ba907be1740213b69422fdf52b57","updated_at":"2012-06-28T14:13:25-07:00","user":"kukuts","votes":0,"html_url":"https://github.com/jacquev6/PyGithub/issues/49","position":1.0,"comments":4,"title":"Support new Search API","labels":["Functionalities","RequestedByUser"],"created_at":"2012-06-21T05:27:38-07:00","state":"open","body":"New API ported from v2 but i have trouble with adopting ask's library for v2 API to support v3 style for searching. \nhttp://developer.github.com/v3/search/\n\nIts not described in the page about parameters that search for repos API supports.\nThey are same as in v2 API, you can look them in ask's library.\nIn v2 was like that https://github.com/api/v2/json/repos/search/testing?start_page=2&language=Python\nIn v3 is https://api.github.com/legacy/repos/search/testing?start_page=2&language=Python"}]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Branch.testEditRequiredPullRequestReviewsWithTooLargeApprovingReviewCount.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/branches/integrations/protection/required_pull_request_reviews 6 | {'Authorization': 'Basic login_and_password_removed', 'Content-Type': 'application/json', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.luke-cage-preview+json'} 7 | {"required_approving_review_count": 9} 8 | 422 9 | [('status', '422 Unprocessable Entity'), ('content-length', '227'), ('x-content-type-options', 'nosniff'), ('content-security-policy', "default-src 'none'"), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'AE1E5031:A39B:2D392574:568E6BC1'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('x-ratelimit-remaining', '4991'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-xss-protection', '1; mode=block'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 28 Aug 2018 04:44:52 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-frame-options', 'deny'), ('x-ratelimit-reset', '1452177625')] 10 | {"documentation_url":"https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch","message":"Invalid request.\n\n9 must be less than or equal to 6."} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue142.testDecodeJson.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /rate_limit 6 | {'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('Date', 'Thu, 24 Oct 2019 14:28:35 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('X-RateLimit-Limit', '60'), ('X-RateLimit-Remaining', '58'), ('X-RateLimit-Reset', '1571930854'), ('Cache-Control', 'no-cache'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('Vary', 'Accept-Encoding'), ('X-GitHub-Request-Id', '67AD:4CF3:4699F:76E9A:5DB1B513')] 10 | {"resources":{"core":{"limit":60,"remaining":58,"reset":1571930854},"search":{"limit":10,"remaining":10,"reset":1571927375},"graphql":{"limit":0,"remaining":0,"reset":1571930915},"integration_manifest":{"limit":5000,"remaining":5000,"reset":1571930915}},"rate":{"limit":60,"remaining":58,"reset":1571930854}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Repository.testReplaceTopics.txt: -------------------------------------------------------------------------------- 1 | https 2 | PUT 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/topics 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.mercy-preview+json', 'User-Agent': 'PyGithub/Python'} 7 | {"names": ["github", "testing"]} 8 | 200 9 | [('content-length', '30'), ('x-runtime-rack', '0.081855'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"c34823528b2c41eadf247bcea3b7dabc"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('x-github-media-type', 'github.mercy-preview; format=json'), ('access-control-expose-headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '4C20:5398:FE4A88:26DA323:5AD7F450'), ('date', 'Thu, 19 Apr 2018 01:43:45 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1524105758')] 10 | {"names": ["testing","github"]} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Github.testGetHookDelivery.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /hooks/257993/deliveries/12345 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'), ('x-github-request-id', 'b3cd8329-7f33-4611-84d1-4e2ecfd91812'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, Accept-Encoding'), ('content-length', '191'), ('server', 'GitHub.com'), ('last-modified', 'Wed, 04 Sep 2013 18:03:57 GMT'), ('x-ratelimit-limit', '5000'), ('etag', '"678dd8e392d70d3a284c3d47221ec6f0"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Wed, 11 Sep 2013 21:10:37 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1378937437')] 10 | {"id":12345,"guid":"abcde-12345","delivered_at":"2012-05-27T06:00:32Z","redelivery":false,"duration":0.27,"status":"OK","status_code":200,"event":"issues","action":"opened","installation_id":123,"repository_id":456,"url":"https://www.example-webhook.com","request":{"headers":{"content-type": "application/json"},"payload":{"action": "opened"}},"response":{"headers":{"content-type": "text/html;charset=utf-8"},"payload":"ok"}} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Issue.testGetEvents.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/issues/28/events 6 | {'Accept': 'application/vnd.github.sailor-v-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4967'), ('content-length', '945'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c22776de31a71795b5374ee3c61f51bd"'), ('date', 'Sun, 20 May 2012 12:02:39 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | [{"url":"https://api.github.com/repos/jacquev6/PyGithub/issues/events/15819975","commit_id":null,"created_at":"2012-05-19T10:38:23Z","event":"subscribed","id":15819975,"actor":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":327146}},{"url":"https://api.github.com/repos/jacquev6/PyGithub/issues/events/15820048","commit_id":null,"created_at":"2012-05-19T10:42:25Z","event":"assigned","id":15820048,"actor":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":327146}}] 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Branch.testEditRequiredPullRequestReviewsWithUserBranchAndDismissalUsers.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/branches/integrations/protection/required_pull_request_reviews 6 | {'Authorization': 'Basic login_and_password_removed', 'Content-Type': 'application/json', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.luke-cage-preview+json'} 7 | {"dismissal_restrictions":{"users":["jacquev6"]}} 8 | 422 9 | [('status', '422 Unprocessable Entity'), ('content-length', '227'), ('x-content-type-options', 'nosniff'), ('content-security-policy', "default-src 'none'"), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'AE1E5031:A39B:2D392574:568E6BC1'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('x-ratelimit-remaining', '4991'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-xss-protection', '1; mode=block'), ('access-control-allow-credentials', 'true'), ('date', 'Mon, 07 May 2018 12:46:55 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-frame-options', 'deny'), ('x-ratelimit-reset', '1452177625')] 10 | {"documentation_url":"https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch","message":"Dismissal restrictions are supported only for repositories owned by an organization."} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/AuthenticatedUser.testCreateKey.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /user/keys 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Mm0RjTNAYFfSCtUpO54usdseroUSIYg5KX4JoseTpqyiB/hqewjYLAdUq/tNIQzrkoEJWSyZrQt0ma7/YCyMYuNGd3DU6q6ZAyBeY3E9RyCiKjO3aTL2VKQGFvBVVmGdxGVSCITRphAcsKc/PF35/fg9XP9S0anMXcEFtdfMHz41SSw+XtE+Vc+6cX9FuI5qUfLGbkv8L1v3g4uw9VXlzq4GfTA+1S7D6mcoGHopAIXFlVr+2RfDKdSURMcB22z41fljO1MW4+zUS/4FyUTpL991es5fcwKXYoiE+x06VJeJJ1Krwx+DZj45uweV6cHXt2JwJEI9fWB6WyBlDejWw== vincent@IDEE", "title": "Key added through PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4984'), ('content-length', '505'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"7261ec55c886d6bf42e48d5bf9544586"'), ('date', 'Sat, 26 May 2012 19:49:30 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/user/keys/2626650')] 10 | {"url":"https://api.github.com/user/keys/2626650","key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Mm0RjTNAYFfSCtUpO54usdseroUSIYg5KX4JoseTpqyiB/hqewjYLAdUq/tNIQzrkoEJWSyZrQt0ma7/YCyMYuNGd3DU6q6ZAyBeY3E9RyCiKjO3aTL2VKQGFvBVVmGdxGVSCITRphAcsKc/PF35/fg9XP9S0anMXcEFtdfMHz41SSw+XtE+Vc+6cX9FuI5qUfLGbkv8L1v3g4uw9VXlzq4GfTA+1S7D6mcoGHopAIXFlVr+2RfDKdSURMcB22z41fljO1MW4+zUS/4FyUTpL991es5fcwKXYoiE+x06VJeJJ1Krwx+DZj45uweV6cHXt2JwJEI9fWB6WyBlDejWw==","verified":true,"title":"Key added through PyGithub","id":2626650} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/PullRequestComment.testEdit.txt: -------------------------------------------------------------------------------- 1 | https 2 | PATCH 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/pulls/comments/886298 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment edited by PyGithub"} 8 | 200 9 | [('status', '200 OK'), ('x-ratelimit-remaining', '4991'), ('content-length', '936'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e8c290c08cd5ed76a92529759e9148bc"'), ('date', 'Sun, 27 May 2012 10:09:07 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"updated_at":"2012-05-27T10:09:07Z","position":5,"_links":{"self":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298"},"html":{"href":"https://github.com/jacquev6/PyGithub/pull/31#r886298"},"pull_request":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31"}},"original_position":5,"body":"Comment edited by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298","commit_id":"8a4f306d4b223682dd19410d4a9150636ebe4206","created_at":"2012-05-27T09:40:12Z","user":{"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},"original_commit_id":"8a4f306d4b223682dd19410d4a9150636ebe4206","path":"src/github/Issue.py","id":886298} 11 | -------------------------------------------------------------------------------- /doc/examples/Branch.rst: -------------------------------------------------------------------------------- 1 | Branch 2 | ========== 3 | 4 | Get list of branches 5 | -------------------- 6 | 7 | .. code-block:: python 8 | 9 | >>> repo = g.get_repo("PyGithub/PyGithub") 10 | >>> list(repo.get_branches()) 11 | [Branch(name="master")] 12 | 13 | Note that the Branch object returned by get_branches() is not fully populated, 14 | and you can not query everything. Use get_branch(branch="master") once you 15 | have the branch name. 16 | 17 | Get a branch 18 | ------------ 19 | 20 | .. code-block:: python 21 | 22 | >>> repo = g.get_repo("PyGithub/PyGithub") 23 | >>> repo.get_branch(branch="master") 24 | Branch(name="master") 25 | 26 | Get HEAD commit of a branch 27 | --------------------------- 28 | 29 | .. code-block:: python 30 | 31 | >>> branch = g.get_repo("PyGithub/PyGithub").get_branch("master") 32 | >>> branch.commit 33 | Commit(sha="5e69ff00a3be0a76b13356c6ff42af79ff469ef3") 34 | 35 | Get protection status of a branch 36 | --------------------------------- 37 | 38 | .. code-block:: python 39 | 40 | >>> branch = g.get_repo("PyGithub/PyGithub").get_branch("master") 41 | >>> branch.protected 42 | True 43 | 44 | See required status checks of a branch 45 | -------------------------------------- 46 | 47 | .. code-block:: python 48 | 49 | >>> branch = g.get_repo("PyGithub/PyGithub").get_branch("master") 50 | >>> branch.get_required_status_checks() 51 | RequiredStatusChecks(url="https://api.github.com/repos/PyGithub/PyGithub/branches/master/protection/required_status_checks", strict=True) 52 | -------------------------------------------------------------------------------- /tests/ReplayData/Logging.testLoggingWithBasicAuthentication.txt: -------------------------------------------------------------------------------- 1 | https 2 | GET 3 | api.github.com 4 | None 5 | /user 6 | {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | None 8 | 200 9 | [('status', '200 OK'), ('content-length', '806'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4993'), ('server', 'nginx'), ('last-modified', 'Fri, 14 Sep 2012 18:47:46 GMT'), ('connection', 'keep-alive'), ('etag', '"434dfe5d3f50558fe3cea087cb95c401"'), ('cache-control', 'private, s-maxage=60, max-age=60'), ('date', 'Mon, 17 Sep 2012 17:12:32 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"owned_private_repos":3,"disk_usage":18612,"following":28,"type":"User","public_repos":13,"location":"Paris, France","company":"Criteo","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","plan":{"space":614400,"private_repos":5,"name":"micro","collaborators":1},"blog":"http://vincent-jacques.net","login":"jacquev6","public_gists":3,"html_url":"https://github.com/jacquev6","hireable":false,"created_at":"2010-07-09T06:10:06Z","private_gists":5,"followers":13,"name":"Vincent Jacques","email":"vincent@vincent-jacques.net","bio":"","total_private_repos":3,"collaborators":0,"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146,"url":"https://api.github.com/users/jacquev6"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Commit.testCreateCommentOnFileLine.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/comments 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment created by PyGithub", "path": "codegen/templates/GithubObject.MethodBody.UseResult.py", "line": 26} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4970'), ('content-length', '764'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d2cb361ce6c53a0fc986e74f8547088f"'), ('date', 'Tue, 22 May 2012 18:49:34 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/comments/1362000')] 10 | {"updated_at":"2012-05-22T18:49:34Z","position":null,"body":"Comment created by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/comments/1362000","commit_id":"1292bf0e22c796e91cc3d6e24b544aece8c21f2a","created_at":"2012-05-22T18:49:34Z","path":"codegen/templates/GithubObject.MethodBody.UseResult.py","line":26,"user":{"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","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146},"id":1362000,"html_url":"https://github.com/jacquev6/PyGithub/commit/1292bf0e22c796e91cc3d6e24b544aece8c21f2a#commitcomment-1362000"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Commit.testCreateStatusWithAllParameters.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/statuses/1292bf0e22c796e91cc3d6e24b544aece8c21f2a 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"state": "success", "target_url": "https://github.com/jacquev6/PyGithub/issues/67", "description": "Status successfuly created by PyGithub"} 8 | 201 9 | [('status', '201 Created'), ('content-length', '603'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4975'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"06233b816702bedc54a6f68734a910bc"'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/statuses/277040'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Sat, 08 Sep 2012 11:30:56 GMT'), ('content-type', 'application/json; charset=utf-8')] 10 | {"creator":{"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","url":"https://api.github.com/users/jacquev6","login":"jacquev6","id":327146},"state":"success","updated_at":"2012-09-08T11:30:56Z","target_url":"https://github.com/jacquev6/PyGithub/issues/67","url":"https://api.github.com/repos/jacquev6/PyGithub/statuses/277040","description":"Status successfuly created by PyGithub","id":277040,"created_at":"2012-09-08T11:30:56Z"} 11 | -------------------------------------------------------------------------------- /tests/ReplayData/Commit.testCreateCommentOnFilePosition.txt: -------------------------------------------------------------------------------- 1 | https 2 | POST 3 | api.github.com 4 | None 5 | /repos/jacquev6/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/comments 6 | {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} 7 | {"body": "Comment also created by PyGithub", "path": "codegen/templates/GithubObject.MethodBody.UseResult.py", "position": 3} 8 | 201 9 | [('status', '201 Created'), ('x-ratelimit-remaining', '4966'), ('content-length', '768'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"b3d062ed01b92c31d072c7177113c0b1"'), ('date', 'Tue, 22 May 2012 18:50:02 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/comments/1362001')] 10 | {"url":"https://api.github.com/repos/jacquev6/PyGithub/comments/1362001","path":"codegen/templates/GithubObject.MethodBody.UseResult.py","body":"Comment also created by PyGithub","html_url":"https://github.com/jacquev6/PyGithub/commit/1292bf0e22c796e91cc3d6e24b544aece8c21f2a#commitcomment-1362001","created_at":"2012-05-22T18:50:02Z","commit_id":"1292bf0e22c796e91cc3d6e24b544aece8c21f2a","position":3,"updated_at":"2012-05-22T18:50:02Z","id":1362001,"line":null,"user":{"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}} 11 | --------------------------------------------------------------------------------