diff --git a/github/BranchProtection.py b/github/BranchProtection.py index 2a88e3c3..3b7d9837 100644 --- a/github/BranchProtection.py +++ b/github/BranchProtection.py @@ -51,6 +51,7 @@ class BranchProtection(github.GithubObject.CompletableGithubObject): self._url: Attribute[str] = NotSet self._required_status_checks: Attribute[RequiredStatusChecks] = NotSet self._enforce_admins: Attribute[bool] = NotSet + self._required_linear_history: Attribute[bool] = github.GithubObject.NotSet self._required_pull_request_reviews: Attribute[RequiredPullRequestReviews] = NotSet self._user_push_restrictions: Opt[str] = NotSet self._team_push_restrictions: Opt[str] = NotSet @@ -70,6 +71,11 @@ class BranchProtection(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._enforce_admins) return self._enforce_admins.value + @property + def required_linear_history(self) -> bool: + self._completeIfNotSet(self._required_linear_history) + return self._required_linear_history.value + @property def required_pull_request_reviews(self) -> RequiredPullRequestReviews: self._completeIfNotSet(self._required_pull_request_reviews) @@ -105,6 +111,8 @@ class BranchProtection(github.GithubObject.CompletableGithubObject): github.RequiredPullRequestReviews.RequiredPullRequestReviews, attributes["required_pull_request_reviews"], ) + if "required_linear_history" in attributes: # pragma no branch + self._required_linear_history = self._makeBoolAttribute(attributes["required_linear_history"]["enabled"]) if "restrictions" in attributes: # pragma no branch self._user_push_restrictions = attributes["restrictions"]["users_url"] self._team_push_restrictions = attributes["restrictions"]["teams_url"] diff --git a/tests/Branch.py b/tests/Branch.py index 760a6651..c6b7c78d 100644 --- a/tests/Branch.py +++ b/tests/Branch.py @@ -61,6 +61,7 @@ class Branch(Framework.TestCase): self.assertTrue(branch_protection.required_status_checks.strict) self.assertEqual(branch_protection.required_status_checks.contexts, []) self.assertTrue(branch_protection.enforce_admins) + self.assertFalse(branch_protection.required_linear_history) self.assertFalse(branch_protection.required_pull_request_reviews.dismiss_stale_reviews) self.assertTrue(branch_protection.required_pull_request_reviews.require_code_owner_reviews) self.assertEqual( diff --git a/tests/BranchProtection.py b/tests/BranchProtection.py index e7a1860d..1076db75 100644 --- a/tests/BranchProtection.py +++ b/tests/BranchProtection.py @@ -26,16 +26,17 @@ from . import Framework class BranchProtection(Framework.TestCase): def setUp(self): super().setUp() - self.branch_protection = self.g.get_user().get_repo("PyGithub").get_branch("integrations").get_protection() + self.branch_protection = self.g.get_repo("curvewise-forks/PyGithub").get_branch("master").get_protection() def testAttributes(self): self.assertTrue(self.branch_protection.required_status_checks.strict) - self.assertEqual(self.branch_protection.required_status_checks.contexts, ["foo/bar"]) + self.assertEqual(self.branch_protection.required_status_checks.contexts, ["build (3.10)"]) + self.assertTrue(self.branch_protection.required_linear_history) self.assertEqual( self.branch_protection.url, - "https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection", + "https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection", ) self.assertEqual( self.branch_protection.__repr__(), - 'BranchProtection(url="https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection")', + 'BranchProtection(url="https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection")', ) diff --git a/tests/ReplayData/BranchProtection.setUp.txt b/tests/ReplayData/BranchProtection.setUp.txt index f3072a30..549f7283 100644 --- a/tests/ReplayData/BranchProtection.setUp.txt +++ b/tests/ReplayData/BranchProtection.setUp.txt @@ -2,42 +2,32 @@ https GET api.github.com None -/user +/repos/curvewise-forks/PyGithub {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('status', '200 OK'), ('x-ratelimit-remaining', '4967'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"27524c635501121933f4f78c95b1945a"'), ('date', 'Fri, 18 May 2012 20:12:19 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"owned_private_repos":5,"collaborators":0,"type":"User","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_gists":1,"company":"Criteo","bio":"","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","private_gists":5,"plan":{"collaborators":1,"private_repos":5,"name":"micro","space":614400},"public_repos":11,"followers":13,"login":"jacquev6","blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","disk_usage":16852,"html_url":"https://github.com/jacquev6","name":"Vincent Jacques","total_private_repos":5,"created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24} +[('Server', 'GitHub.com'), ('Date', 'Fri, 09 Jun 2023 16:53:53 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"df683b827e7c82340d835f6bf47652fca31804e1fa7ca705ed2c97ab38e0772a"'), ('Last-Modified', 'Thu, 08 Jun 2023 17:42:36 GMT'), ('X-OAuth-Scopes', 'read:org, repo'), ('X-Accepted-OAuth-Scopes', 'repo'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4999'), ('X-RateLimit-Reset', '1686333233'), ('X-RateLimit-Used', '1'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'D5E0:378B:CA42FC6:19D676AA:64835921')] +{"id":586160171,"node_id":"R_kgDOIvAYKw","name":"PyGithub","full_name":"curvewise-forks/PyGithub","private":false,"owner":{"login":"curvewise-forks","id":72516939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNTE2OTM5","avatar_url":"https://avatars.githubusercontent.com/u/72516939?v=4","gravatar_id":"","url":"https://api.github.com/users/curvewise-forks","html_url":"https://github.com/curvewise-forks","followers_url":"https://api.github.com/users/curvewise-forks/followers","following_url":"https://api.github.com/users/curvewise-forks/following{/other_user}","gists_url":"https://api.github.com/users/curvewise-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/curvewise-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curvewise-forks/subscriptions","organizations_url":"https://api.github.com/users/curvewise-forks/orgs","repos_url":"https://api.github.com/users/curvewise-forks/repos","events_url":"https://api.github.com/users/curvewise-forks/events{/privacy}","received_events_url":"https://api.github.com/users/curvewise-forks/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/curvewise-forks/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/curvewise-forks/PyGithub","forks_url":"https://api.github.com/repos/curvewise-forks/PyGithub/forks","keys_url":"https://api.github.com/repos/curvewise-forks/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/curvewise-forks/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/curvewise-forks/PyGithub/teams","hooks_url":"https://api.github.com/repos/curvewise-forks/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/curvewise-forks/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/curvewise-forks/PyGithub/events","assignees_url":"https://api.github.com/repos/curvewise-forks/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/curvewise-forks/PyGithub/tags","blobs_url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/curvewise-forks/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/curvewise-forks/PyGithub/languages","stargazers_url":"https://api.github.com/repos/curvewise-forks/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/curvewise-forks/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/curvewise-forks/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/curvewise-forks/PyGithub/subscription","commits_url":"https://api.github.com/repos/curvewise-forks/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/curvewise-forks/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/curvewise-forks/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/curvewise-forks/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/curvewise-forks/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/curvewise-forks/PyGithub/merges","archive_url":"https://api.github.com/repos/curvewise-forks/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/curvewise-forks/PyGithub/downloads","issues_url":"https://api.github.com/repos/curvewise-forks/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/curvewise-forks/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/curvewise-forks/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/curvewise-forks/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/curvewise-forks/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/curvewise-forks/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/curvewise-forks/PyGithub/deployments","created_at":"2023-01-07T06:21:50Z","updated_at":"2023-06-08T17:42:36Z","pushed_at":"2023-06-08T17:42:22Z","git_url":"git://github.com/curvewise-forks/PyGithub.git","ssh_url":"git@github.com:curvewise-forks/PyGithub.git","clone_url":"https://github.com/curvewise-forks/PyGithub.git","svn_url":"https://github.com/curvewise-forks/PyGithub","homepage":"https://pygithub.readthedocs.io/","size":11822,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"master","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"","allow_squash_merge":true,"allow_merge_commit":true,"allow_rebase_merge":true,"allow_auto_merge":false,"delete_branch_on_merge":false,"allow_update_branch":false,"use_squash_pr_title_as_default":false,"squash_merge_commit_message":"COMMIT_MESSAGES","squash_merge_commit_title":"COMMIT_OR_PR_TITLE","merge_commit_message":"PR_TITLE","merge_commit_title":"MERGE_MESSAGE","organization":{"login":"curvewise-forks","id":72516939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNTE2OTM5","avatar_url":"https://avatars.githubusercontent.com/u/72516939?v=4","gravatar_id":"","url":"https://api.github.com/users/curvewise-forks","html_url":"https://github.com/curvewise-forks","followers_url":"https://api.github.com/users/curvewise-forks/followers","following_url":"https://api.github.com/users/curvewise-forks/following{/other_user}","gists_url":"https://api.github.com/users/curvewise-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/curvewise-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curvewise-forks/subscriptions","organizations_url":"https://api.github.com/users/curvewise-forks/orgs","repos_url":"https://api.github.com/users/curvewise-forks/repos","events_url":"https://api.github.com/users/curvewise-forks/events{/privacy}","received_events_url":"https://api.github.com/users/curvewise-forks/received_events","type":"Organization","site_admin":false},"parent":{"id":3544490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTQ0NDkw","name":"PyGithub","full_name":"PyGithub/PyGithub","private":false,"owner":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2023-06-08T20:29:20Z","pushed_at":"2023-06-09T13:46:47Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"https://pygithub.readthedocs.io/","size":13939,"stargazers_count":6054,"watchers_count":6054,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":true,"forks_count":1637,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":255,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["github","github-api","pygithub","python"],"visibility":"public","forks":1637,"open_issues":255,"watchers":6054,"default_branch":"master"},"source":{"id":3544490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTQ0NDkw","name":"PyGithub","full_name":"PyGithub/PyGithub","private":false,"owner":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2023-06-08T20:29:20Z","pushed_at":"2023-06-09T13:46:47Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"https://pygithub.readthedocs.io/","size":13939,"stargazers_count":6054,"watchers_count":6054,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":true,"forks_count":1637,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":255,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["github","github-api","pygithub","python"],"visibility":"public","forks":1637,"open_issues":255,"watchers":6054,"default_branch":"master"},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"}},"network_count":1637,"subscribers_count":0} https GET api.github.com None -/repos/jacquev6/PyGithub +/repos/curvewise-forks/PyGithub/branches/master {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('status', '200 OK'), ('x-ratelimit-remaining', '4966'), ('content-length', '1097'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c5eec74d4b76b80283636a8efe1a132c"'), ('date', 'Fri, 18 May 2012 20:12:20 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"svn_url":"https://github.com/jacquev6/PyGithub","has_wiki":false,"has_issues":true,"updated_at":"2012-05-18T05:29:54Z","forks":2,"homepage":"http://vincent-jacques.net/PyGithub","git_url":"git://github.com/jacquev6/PyGithub.git","url":"https://api.github.com/repos/jacquev6/PyGithub","clone_url":"https://github.com/jacquev6/PyGithub.git","open_issues":17,"fork":false,"ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-18T05:18:16Z","size":304,"private":false,"has_downloads":true,"watchers":13,"html_url":"https://github.com/jacquev6/PyGithub","owner":{"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},"name":"PyGithub","permissions":{"pull":true,"admin":true,"push":true},"mirror_url":null,"language":"Python","description":"Python library implementing the full Github API v3","created_at":"2012-02-25T12:53:47Z","id":3544490} +[('Server', 'GitHub.com'), ('Date', 'Fri, 09 Jun 2023 16:53:54 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"075a0661366a824063b2aa3c3ff62b3ac4ecd6eeefc8e1d6f6675342fe7ab0a6"'), ('X-OAuth-Scopes', 'read:org, repo'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4998'), ('X-RateLimit-Reset', '1686333233'), ('X-RateLimit-Used', '2'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'D5E2:7DDB:CF41795:1A7935E9:64835922')] +{"name":"master","commit":{"sha":"a4fce2bba495bbba81543d71a7e1c9523bf34495","node_id":"C_kwDOIvAYK9oAKGE0ZmNlMmJiYTQ5NWJiYmE4MTU0M2Q3MWE3ZTFjOTUyM2JmMzQ0OTU","commit":{"author":{"name":"Paul Melnikow","email":"github@paulmelnikow.com","date":"2023-06-08T17:42:21Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2023-06-08T17:42:21Z"},"message":"Create pylint.yml (#1)","tree":{"sha":"5c862cb0c7ce81d72b0f7f2ee25a3b9c8caba177","url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/trees/5c862cb0c7ce81d72b0f7f2ee25a3b9c8caba177"},"url":"https://api.github.com/repos/curvewise-forks/PyGithub/git/commits/a4fce2bba495bbba81543d71a7e1c9523bf34495","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJkghL9CRBK7hj4Ov3rIwAAsTEIAHZScZ1WcJOuHujBKw850u6v\nAig6k8fbhKC12lk2zrpBrb0NL1AmujnmX2D9Ioe7geEl7pz0mwOENdMo6CmA8SQA\nZx/jr2NxguDj6Z0LY6mWQgDMVMmzxV63iUJCWsnAPwHW7lvVK6BJTdrNBtaEgq3D\n7gZPrUBAyxF/6SFivfSAMr2nTFdSrvg9jq+0DlwqYC4VxIveWbp7HVH5oKOApmYv\ndP6lnsmg3p2QwrXNret8AgBMVWw2F1i5PVcMJmstSonALb5+jPAseFUXwJefQwIQ\nvfJl7R6cviWK/o04UR1Xo4YZc8AkftHn0yQ01rfyMaOMqIODWSBjDFv2tcU0zEY=\n=ogx1\n-----END PGP SIGNATURE-----\n","payload":"tree 5c862cb0c7ce81d72b0f7f2ee25a3b9c8caba177\nparent 6c53e5442a80094025b390772d3e00a0d8443a75\nauthor Paul Melnikow 1686246141 -0400\ncommitter GitHub 1686246141 -0600\n\nCreate pylint.yml (#1)\n\n"}},"url":"https://api.github.com/repos/curvewise-forks/PyGithub/commits/a4fce2bba495bbba81543d71a7e1c9523bf34495","html_url":"https://github.com/curvewise-forks/PyGithub/commit/a4fce2bba495bbba81543d71a7e1c9523bf34495","comments_url":"https://api.github.com/repos/curvewise-forks/PyGithub/commits/a4fce2bba495bbba81543d71a7e1c9523bf34495/comments","author":{"login":"paulmelnikow","id":1487036,"node_id":"MDQ6VXNlcjE0ODcwMzY=","avatar_url":"https://avatars.githubusercontent.com/u/1487036?v=4","gravatar_id":"","url":"https://api.github.com/users/paulmelnikow","html_url":"https://github.com/paulmelnikow","followers_url":"https://api.github.com/users/paulmelnikow/followers","following_url":"https://api.github.com/users/paulmelnikow/following{/other_user}","gists_url":"https://api.github.com/users/paulmelnikow/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmelnikow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmelnikow/subscriptions","organizations_url":"https://api.github.com/users/paulmelnikow/orgs","repos_url":"https://api.github.com/users/paulmelnikow/repos","events_url":"https://api.github.com/users/paulmelnikow/events{/privacy}","received_events_url":"https://api.github.com/users/paulmelnikow/received_events","type":"User","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","site_admin":false},"parents":[{"sha":"6c53e5442a80094025b390772d3e00a0d8443a75","url":"https://api.github.com/repos/curvewise-forks/PyGithub/commits/6c53e5442a80094025b390772d3e00a0d8443a75","html_url":"https://github.com/curvewise-forks/PyGithub/commit/6c53e5442a80094025b390772d3e00a0d8443a75"}]},"_links":{"self":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master","html":"https://github.com/curvewise-forks/PyGithub/tree/master"},"protected":true,"protection":{"enabled":true,"required_status_checks":{"enforcement_level":"everyone","contexts":["build (3.10)"],"checks":[{"context":"build (3.10)","app_id":15368}]}},"protection_url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection"} https GET api.github.com None -/repos/jacquev6/PyGithub/branches/integrations -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/repos/curvewise-forks/PyGithub/branches/master/protection +{'Accept': 'application/vnd.github.luke-cage-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '330'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"2dada6dafd332016bcdf06e42487e520"'), ('date', 'Thu, 10 May 2012 13:56:55 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"name":"integrations","commit":{"sha":"d60943db8c9ae6ca1f9400d378a757e6f281dbde","url":"https://api.github.com/repos/jacquev6/PyGithub/commits/d60943db8c9ae6ca1f9400d378a757e6f281dbde"},"protected":true,"protection":{"enabled":true,"required_status_checks":{"strict":true,"contexts":["foo/bar"]}},"protection_url":"https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection"} +[('Server', 'GitHub.com'), ('Date', 'Fri, 09 Jun 2023 16:53:54 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', 'W/"cdfb177e9c10c1c5d5b84c3667f1deb64f69634c27cfcd1c9edb937b14510276"'), ('X-OAuth-Scopes', 'read:org, repo'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.v3; param=luke-cage-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4997'), ('X-RateLimit-Reset', '1686333233'), ('X-RateLimit-Used', '3'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'DDEA:9715:CE8BD3E:1A63C049:64835922')] +{"url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection","required_status_checks":{"url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection/required_status_checks","strict":true,"contexts":["build (3.10)"],"contexts_url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection/required_status_checks/contexts","checks":[{"context":"build (3.10)","app_id":15368}]},"required_pull_request_reviews":{"url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection/required_pull_request_reviews","dismiss_stale_reviews":false,"require_code_owner_reviews":false,"require_last_push_approval":false,"required_approving_review_count":1},"required_signatures":{"url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection/required_signatures","enabled":false},"enforce_admins":{"url":"https://api.github.com/repos/curvewise-forks/PyGithub/branches/master/protection/enforce_admins","enabled":true},"required_linear_history":{"enabled":true},"allow_force_pushes":{"enabled":false},"allow_deletions":{"enabled":false},"block_creations":{"enabled":false},"required_conversation_resolution":{"enabled":false},"lock_branch":{"enabled":false},"allow_fork_syncing":{"enabled":false}} -https -GET -api.github.com -None -/repos/jacquev6/PyGithub/branches/integrations/protection -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Accept': 'application/vnd.github.luke-cage-preview+json'} -None -200 -[('x-runtime-rack', '0.050971'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('x-oauth-scopes', 'public_repo, repo:status'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', 'W/"e0dc2dfc56971f4a36de1216356ea98b"'), ('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', '4993'), ('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'), ('transfer-encoding', 'chunked'), ('x-github-request-id', 'E962:55F3:1A4A1F1:404B411:5AF928BE'), ('date', 'Mon, 14 May 2018 06:12:48 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('content-encoding', 'gzip'), ('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', '1526281649')] -{"url": "https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection", "required_pull_request_reviews": {"url": "https://api.github.com/repos/jacquev6/PyGithub/branches/add-pr-review-request/protection/required_pull_request_reviews", "dismiss_stale_reviews": true, "require_code_owner_reviews": false}, "required_status_checks": {"url": "https://api.github.com/repos/jacquev6/PyGithub/branches/add-pr-review-request/protection/required_status_checks", "strict": true, "contexts": ["foo/bar"], "contexts_url": "https://api.github.com/repos/jacquev6/PyGithub/branches/add-pr-review-request/protection/required_status_checks/contexts"}, "enforce_admins": {"url": "https://api.github.com/repos/jacquev6/PyGithub/branches/add-pr-review-request/protection/enforce_admins", "enabled": true}}