From 13ca617d25ec3ec52fb36a713e505e66b07156df Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:32:47 +0000 Subject: [PATCH 01/22] All creation of github dependabot secrets --- github/Organization.py | 9 ++++++--- github/OrganizationSecret.py | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 2f08f04d0e..80efac225e 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -577,15 +577,18 @@ def create_secret( self, secret_name: str, unencrypted_value: str, + secret_type: str = "actions", # TODO: actions or dependabot visibility: str = "all", selected_repositories: Opt[list[github.Repository.Repository]] = NotSet, ) -> github.OrganizationSecret.OrganizationSecret: """ - :calls: `PUT /orgs/{org}/actions/secrets/{secret_name} `_ + :calls: `PUT /orgs/{org}/{secret_type}/secrets/{secret_name} `_ """ assert isinstance(secret_name, str), secret_name assert isinstance(unencrypted_value, str), unencrypted_value assert isinstance(visibility, str), visibility + assert isinstance(secret_type, str), secret_type + if visibility == "selected": assert isinstance(selected_repositories, list) and all( isinstance(element, github.Repository.Repository) for element in selected_repositories @@ -604,7 +607,7 @@ def create_secret( put_parameters["selected_repository_ids"] = [element.id for element in selected_repositories] self._requester.requestJsonAndCheck( - "PUT", f"{self.url}/actions/secrets/{urllib.parse.quote(secret_name)}", input=put_parameters + "PUT", f"{self.url}/{secret_type}/secrets/{urllib.parse.quote(secret_name)}", input=put_parameters ) return github.OrganizationSecret.OrganizationSecret( @@ -614,7 +617,7 @@ def create_secret( "name": secret_name, "visibility": visibility, "selected_repositories_url": f"{self.url}/actions/secrets/{urllib.parse.quote(secret_name)}/repositories", - "url": f"{self.url}/actions/secrets/{urllib.parse.quote(secret_name)}", + "url": f"{self.url}/{secret_type}/secrets/{urllib.parse.quote(secret_name)}", }, completed=False, ) diff --git a/github/OrganizationSecret.py b/github/OrganizationSecret.py index f0c06086e2..5e93bc857c 100644 --- a/github/OrganizationSecret.py +++ b/github/OrganizationSecret.py @@ -65,10 +65,11 @@ def selected_repositories(self) -> PaginatedList[Repository]: def edit( self, value: str, + secret_type: str = "actions", # TODO: actions or dependabot visibility: str = "all", ) -> bool: """ - :calls: `PATCH /orgs/{org}/actions/secrets/{variable_name} `_ + :calls: `PATCH /orgs/{org}/{secret_type}/secrets/{variable_name} `_ :param variable_name: string :param value: string :param visibility: string @@ -76,6 +77,7 @@ def edit( """ assert isinstance(value, str), value assert isinstance(visibility, str), visibility + assert isinstance(secret_type, str), secret_type patch_parameters: Dict[str, Any] = { "name": self.name, @@ -85,7 +87,7 @@ def edit( status, _, _ = self._requester.requestJson( "PATCH", - f"{self.url}/actions/secrets/{self.name}", + f"{self.url}/{secret_type}/secrets/{self.name}", input=patch_parameters, ) return status == 204 From 832201e7c4e779666d9436e46a80b0f965208b1b Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:54:44 +0000 Subject: [PATCH 02/22] Add some tests --- tests/Organization.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/Organization.py b/tests/Organization.py index f0cfb4ca9e..18ab40af18 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -430,10 +430,17 @@ def testCreateRepoFromTemplateWithAllArguments(self): self.assertTrue(repo.private) @mock.patch("github.PublicKey.encrypt") - def testCreateSecret(self, encrypt): + def testCreateActionsSecret(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret-name", "secret-value", "all") + secret = self.org.create_secret("secret-name", "secret-value", visibility="all") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret("secret-name", "secret-value", secret_type="dependabot", visibility="all") self.assertIsNotNone(secret) @mock.patch("github.PublicKey.encrypt") From 089505f95143b70b23006aff29601811edeaf54b Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:02:09 +0000 Subject: [PATCH 03/22] encrypt the secret --- github/Organization.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 80efac225e..88cfd590fc 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -596,7 +596,7 @@ def create_secret( else: assert selected_repositories is NotSet - public_key = self.get_public_key() + public_key = self.get_public_key(secret_type=secret_type) payload = public_key.encrypt(unencrypted_value) put_parameters: dict[str, Any] = { "key_id": public_key.key_id, @@ -1008,12 +1008,12 @@ def convert_to_outside_collaborator(self, member: NamedUser) -> None: "PUT", f"{self.url}/outside_collaborators/{member._identity}" ) - def get_public_key(self) -> PublicKey: + def get_public_key(self, secret_type="actions") -> PublicKey: """ - :calls: `GET /orgs/{org}/actions/secrets/public-key `_ + :calls: `GET /orgs/{org}/{secret_type}/secrets/public-key `_ :rtype: :class:`github.PublicKey.PublicKey` """ - headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/actions/secrets/public-key") + headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/{secret_type}/secrets/public-key") return github.PublicKey.PublicKey(self._requester, headers, data, completed=True) def get_repo(self, name: str) -> Repository: From e69fb82c1f409c15bb0810a651869422792ec630 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:07:11 +0000 Subject: [PATCH 04/22] fix assertion --- github/Organization.py | 4 ++-- github/OrganizationSecret.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 88cfd590fc..ddb4adf8e0 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -577,7 +577,7 @@ def create_secret( self, secret_name: str, unencrypted_value: str, - secret_type: str = "actions", # TODO: actions or dependabot + secret_type: str = "actions", visibility: str = "all", selected_repositories: Opt[list[github.Repository.Repository]] = NotSet, ) -> github.OrganizationSecret.OrganizationSecret: @@ -586,8 +586,8 @@ def create_secret( """ assert isinstance(secret_name, str), secret_name assert isinstance(unencrypted_value, str), unencrypted_value + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" assert isinstance(visibility, str), visibility - assert isinstance(secret_type, str), secret_type if visibility == "selected": assert isinstance(selected_repositories, list) and all( diff --git a/github/OrganizationSecret.py b/github/OrganizationSecret.py index 5e93bc857c..1e29d80b96 100644 --- a/github/OrganizationSecret.py +++ b/github/OrganizationSecret.py @@ -65,7 +65,7 @@ def selected_repositories(self) -> PaginatedList[Repository]: def edit( self, value: str, - secret_type: str = "actions", # TODO: actions or dependabot + secret_type: str = "actions", visibility: str = "all", ) -> bool: """ @@ -77,7 +77,7 @@ def edit( """ assert isinstance(value, str), value assert isinstance(visibility, str), visibility - assert isinstance(secret_type, str), secret_type + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" patch_parameters: Dict[str, Any] = { "name": self.name, From 4161453c304aec34cb52cf5403ab25baca1323d8 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:15:46 +0000 Subject: [PATCH 05/22] create repo secrets too --- github/Repository.py | 44 ++++++++++++++++++++++++++++++++------------ tests/Repository.py | 9 ++++++++- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index 4520840033..55da637c1f 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1690,53 +1690,71 @@ def create_repository_dispatch(self, event_type: str, client_payload: Opt[dict[s status, headers, data = self._requester.requestJson("POST", f"{self.url}/dispatches", input=post_parameters) return status == 204 - def create_secret(self, secret_name: str, unencrypted_value: str) -> github.Secret.Secret: + def create_secret( + self, + secret_name: str, + unencrypted_value: str, + secret_type: str = "actions", + ) -> github.Secret.Secret: """ - :calls: `PUT /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ + :calls: `PUT /repos/{owner}/{repo}/{secret_type}/secrets/{secret_name} `_ """ assert isinstance(secret_name, str), secret_name assert isinstance(unencrypted_value, str), unencrypted_value + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" + secret_name = urllib.parse.quote(secret_name) - public_key = self.get_public_key() + public_key = self.get_public_key() # TODO payload = public_key.encrypt(unencrypted_value) put_parameters = { "key_id": public_key.key_id, "encrypted_value": payload, } - self._requester.requestJsonAndCheck("PUT", f"{self.url}/actions/secrets/{secret_name}", input=put_parameters) + self._requester.requestJsonAndCheck( + "PUT", f"{self.url}/{secret_type}/secrets/{secret_name}", input=put_parameters + ) return github.Secret.Secret( requester=self._requester, headers={}, attributes={ "name": secret_name, - "url": f"{self.url}/actions/secrets/{secret_name}", + "url": f"{self.url}/{secret_type}/secrets/{secret_name}", }, completed=False, ) - def get_secrets(self) -> PaginatedList[github.Secret.Secret]: + def get_secrets( + self, + secret_type: str = "actions", + ) -> PaginatedList[github.Secret.Secret]: """ Gets all repository secrets """ + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" + return PaginatedList( github.Secret.Secret, self._requester, - f"{self.url}/actions/secrets", + f"{self.url}/{secret_type}/secrets", None, - attributesTransformer=PaginatedList.override_attributes({"secrets_url": f"{self.url}/actions/secrets"}), + attributesTransformer=PaginatedList.override_attributes( + {"secrets_url": f"{self.url}/{secret_type}/secrets"} + ), list_item="secrets", ) - def get_secret(self, secret_name: str) -> github.Secret.Secret: + def get_secret(self, secret_name: str, secret_type: str = "actions") -> github.Secret.Secret: """ :calls: 'GET /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ """ assert isinstance(secret_name, str), secret_name + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" + secret_name = urllib.parse.quote(secret_name) return github.Secret.Secret( requester=self._requester, headers={}, - attributes={"url": f"{self.url}/actions/secrets/{secret_name}"}, + attributes={"url": f"{self.url}/{secret_type}/secrets/{secret_name}"}, completed=False, ) @@ -2988,12 +3006,14 @@ def get_network_events(self) -> PaginatedList[Event]: None, ) - def get_public_key(self) -> PublicKey: + def get_public_key(self, secret_type="actions") -> PublicKey: """ :calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key `_ :rtype: :class:`github.PublicKey.PublicKey` """ - headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/actions/secrets/public-key") + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" + + headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/{secret_type}/secrets/public-key") return github.PublicKey.PublicKey(self._requester, headers, data, completed=True) def get_pull(self, number: int) -> PullRequest: diff --git a/tests/Repository.py b/tests/Repository.py index 4b4bb385ec..14486da2af 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -482,12 +482,19 @@ def testCreateRepositoryDispatch(self): self.assertTrue(without_payload) @mock.patch("github.PublicKey.encrypt") - def testCreateSecret(self, encrypt): + def testCreateActionsSecret(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" secret = self.repo.create_secret("secret-name", "secret-value") self.assertIsNotNone(secret) + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.repo.create_secret("secret-name", "secret-value", secret_type="dependabot") + self.assertIsNotNone(secret) + @mock.patch("github.PublicKey.encrypt") def testRepoSecrets(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches From b9af2e1dbc8106f4168e12fb8a13193ca1d02e16 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:20:34 +0000 Subject: [PATCH 06/22] fix linting --- github/Organization.py | 2 +- github/Repository.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index ddb4adf8e0..e42fbf43ae 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -1008,7 +1008,7 @@ def convert_to_outside_collaborator(self, member: NamedUser) -> None: "PUT", f"{self.url}/outside_collaborators/{member._identity}" ) - def get_public_key(self, secret_type="actions") -> PublicKey: + def get_public_key(self, secret_type: str = "actions") -> PublicKey: """ :calls: `GET /orgs/{org}/{secret_type}/secrets/public-key `_ :rtype: :class:`github.PublicKey.PublicKey` diff --git a/github/Repository.py b/github/Repository.py index 55da637c1f..1d640703b4 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -3006,7 +3006,7 @@ def get_network_events(self) -> PaginatedList[Event]: None, ) - def get_public_key(self, secret_type="actions") -> PublicKey: + def get_public_key(self, secret_type: str = "actions") -> PublicKey: """ :calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key `_ :rtype: :class:`github.PublicKey.PublicKey` From 99c7b9841407dec1b54db86ef8f9349e046a0890 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:32:01 +0000 Subject: [PATCH 07/22] add replay files --- github/Organization.py | 2 +- tests/Organization.py | 2 +- tests/ReplayData/Organization.testCreateActionsSecret.txt | 0 tests/ReplayData/Organization.testCreateDependabotSecret.txt | 0 tests/ReplayData/Repository.testCreateActionsSecret.txt | 0 tests/ReplayData/Repository.testCreateDependabotSecret.txt | 0 6 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/ReplayData/Organization.testCreateActionsSecret.txt create mode 100644 tests/ReplayData/Organization.testCreateDependabotSecret.txt create mode 100644 tests/ReplayData/Repository.testCreateActionsSecret.txt create mode 100644 tests/ReplayData/Repository.testCreateDependabotSecret.txt diff --git a/github/Organization.py b/github/Organization.py index e42fbf43ae..324aeb567a 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -577,8 +577,8 @@ def create_secret( self, secret_name: str, unencrypted_value: str, - secret_type: str = "actions", visibility: str = "all", + secret_type: str = "actions", selected_repositories: Opt[list[github.Repository.Repository]] = NotSet, ) -> github.OrganizationSecret.OrganizationSecret: """ diff --git a/tests/Organization.py b/tests/Organization.py index 18ab40af18..380e054c10 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -448,7 +448,7 @@ def testCreateSecretSelected(self, encrypt): repos = [self.org.get_repo("TestPyGithub"), self.org.get_repo("FatherBeaver")] # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret-name", "secret-value", "selected", repos) + secret = self.org.create_secret("secret-name", "secret-value", "selected", "actions", repos) self.assertIsNotNone(secret) self.assertEqual(secret.visibility, "selected") self.assertEqual(list(secret.selected_repositories), repos) diff --git a/tests/ReplayData/Organization.testCreateActionsSecret.txt b/tests/ReplayData/Organization.testCreateActionsSecret.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/ReplayData/Organization.testCreateDependabotSecret.txt b/tests/ReplayData/Organization.testCreateDependabotSecret.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/ReplayData/Repository.testCreateActionsSecret.txt b/tests/ReplayData/Repository.testCreateActionsSecret.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/ReplayData/Repository.testCreateDependabotSecret.txt b/tests/ReplayData/Repository.testCreateDependabotSecret.txt new file mode 100644 index 0000000000..e69de29bb2 From c9b1db4b82bf3a50c59ebd3b5b7906f989cdbf34 Mon Sep 17 00:00:00 2001 From: Sean Killen Date: Wed, 17 Jan 2024 18:54:30 +0000 Subject: [PATCH 08/22] Fixing tests , updating Repository Public Key config --- github/Repository.py | 2 +- .../Organization.testCreateActionsSecret.txt | 21 +++++++++++++++++++ ...rganization.testCreateDependabotSecret.txt | 21 +++++++++++++++++++ .../Repository.testCreateActionsSecret.txt | 21 +++++++++++++++++++ .../Repository.testCreateDependabotSecret.txt | 21 +++++++++++++++++++ tests/Repository.py | 4 ++-- 6 files changed, 87 insertions(+), 3 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index 1d640703b4..97a5e799eb 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1704,7 +1704,7 @@ def create_secret( assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" secret_name = urllib.parse.quote(secret_name) - public_key = self.get_public_key() # TODO + public_key = self.get_public_key(secret_type=secret_type) # TODO payload = public_key.encrypt(unencrypted_value) put_parameters = { "key_id": public_key.key_id, diff --git a/tests/ReplayData/Organization.testCreateActionsSecret.txt b/tests/ReplayData/Organization.testCreateActionsSecret.txt index e69de29bb2..be828cceaf 100644 --- a/tests/ReplayData/Organization.testCreateActionsSecret.txt +++ b/tests/ReplayData/Organization.testCreateActionsSecret.txt @@ -0,0 +1,21 @@ +https +GET +api.github.com +None +/orgs/BeaverSoftware/actions/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('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')] +{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} + +https +PUT +api.github.com +None +/orgs/BeaverSoftware/actions/secrets/secret-name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743", "visibility": "all"} +201 +[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] +{} diff --git a/tests/ReplayData/Organization.testCreateDependabotSecret.txt b/tests/ReplayData/Organization.testCreateDependabotSecret.txt index e69de29bb2..9eeab9602f 100644 --- a/tests/ReplayData/Organization.testCreateDependabotSecret.txt +++ b/tests/ReplayData/Organization.testCreateDependabotSecret.txt @@ -0,0 +1,21 @@ +https +GET +api.github.com +None +/orgs/BeaverSoftware/dependabot/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('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')] +{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} + +https +PUT +api.github.com +None +/orgs/BeaverSoftware/dependabot/secrets/secret-name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743", "visibility": "all"} +201 +[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] +{} diff --git a/tests/ReplayData/Repository.testCreateActionsSecret.txt b/tests/ReplayData/Repository.testCreateActionsSecret.txt index e69de29bb2..91169b37bd 100644 --- a/tests/ReplayData/Repository.testCreateActionsSecret.txt +++ b/tests/ReplayData/Repository.testCreateActionsSecret.txt @@ -0,0 +1,21 @@ +https +GET +api.github.com +None +/repos/jacquev6/PyGithub/actions/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('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')] +{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} + +https +PUT +api.github.com +None +/repos/jacquev6/PyGithub/actions/secrets/secret-name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743"} +201 +[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] +{} diff --git a/tests/ReplayData/Repository.testCreateDependabotSecret.txt b/tests/ReplayData/Repository.testCreateDependabotSecret.txt index e69de29bb2..5f4dd97395 100644 --- a/tests/ReplayData/Repository.testCreateDependabotSecret.txt +++ b/tests/ReplayData/Repository.testCreateDependabotSecret.txt @@ -0,0 +1,21 @@ +https +GET +api.github.com +None +/repos/jacquev6/PyGithub/dependabot/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('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')] +{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} + +https +PUT +api.github.com +None +/repos/jacquev6/PyGithub/dependabot/secrets/secret-name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743"} +201 +[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] +{} diff --git a/tests/Repository.py b/tests/Repository.py index 14486da2af..de1c49ce10 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -485,14 +485,14 @@ def testCreateRepositoryDispatch(self): def testCreateActionsSecret(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret-name", "secret-value") + secret = self.repo.create_secret("secret-name", "secret-value", "actions") self.assertIsNotNone(secret) @mock.patch("github.PublicKey.encrypt") def testCreateDependabotSecret(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret-name", "secret-value", secret_type="dependabot") + secret = self.repo.create_secret("secret-name", "secret-value", "dependabot") self.assertIsNotNone(secret) @mock.patch("github.PublicKey.encrypt") From 353c33e055e9a6991583b9f68347a030bcb80dc5 Mon Sep 17 00:00:00 2001 From: Sean Killen Date: Wed, 17 Jan 2024 20:47:20 +0000 Subject: [PATCH 09/22] Refactoring Tests to isolate to issue and specific ReplayData --- tests/Issue2284.py | 39 +++++++++++++++++++ tests/Organization.py | 14 ------- tests/ReplayData/Issue2284.setUp.txt | 21 ++++++++++ .../Issue2284.testCreateActionsSecret.txt | 20 ++++++++++ .../Issue2284.testCreateDependabotSecret.txt | 20 ++++++++++ .../Issue2284.testCreateRepoActionsSecret.txt | 20 ++++++++++ ...sue2284.testCreateRepoDependabotSecret.txt | 20 ++++++++++ tests/Repository.py | 14 ------- 8 files changed, 140 insertions(+), 28 deletions(-) create mode 100644 tests/Issue2284.py create mode 100644 tests/ReplayData/Issue2284.setUp.txt create mode 100644 tests/ReplayData/Issue2284.testCreateActionsSecret.txt create mode 100644 tests/ReplayData/Issue2284.testCreateDependabotSecret.txt create mode 100644 tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt create mode 100644 tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt diff --git a/tests/Issue2284.py b/tests/Issue2284.py new file mode 100644 index 0000000000..90a17a5499 --- /dev/null +++ b/tests/Issue2284.py @@ -0,0 +1,39 @@ +from unittest import mock + +from . import Framework + + +class Issue2284(Framework.TestCase): + def setUp(self): + super().setUp() + self.user = self.g.get_user() + self.org = self.g.get_organization("smk-org") + self.repo = self.org.get_repo("demo-repo-1") + + @mock.patch("github.PublicKey.encrypt") + def testCreateActionsSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret("secret_name", "secret-value", visibility="all") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateRepoActionsSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.repo.create_secret("secret_name", "secret-value", "actions") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateRepoDependabotSecret(self, encrypt): + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.repo.create_secret("secret_name", "secret-value", "dependabot") + self.assertIsNotNone(secret) diff --git a/tests/Organization.py b/tests/Organization.py index 380e054c10..45b9be637c 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -429,20 +429,6 @@ def testCreateRepoFromTemplateWithAllArguments(self): self.assertEqual(repo.description, description) self.assertTrue(repo.private) - @mock.patch("github.PublicKey.encrypt") - def testCreateActionsSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret-name", "secret-value", visibility="all") - self.assertIsNotNone(secret) - - @mock.patch("github.PublicKey.encrypt") - def testCreateDependabotSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret-name", "secret-value", secret_type="dependabot", visibility="all") - self.assertIsNotNone(secret) - @mock.patch("github.PublicKey.encrypt") def testCreateSecretSelected(self, encrypt): repos = [self.org.get_repo("TestPyGithub"), self.org.get_repo("FatherBeaver")] diff --git a/tests/ReplayData/Issue2284.setUp.txt b/tests/ReplayData/Issue2284.setUp.txt new file mode 100644 index 0000000000..2645e668ec --- /dev/null +++ b/tests/ReplayData/Issue2284.setUp.txt @@ -0,0 +1,21 @@ +https +GET +api.github.com +None +/orgs/smk-org +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 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/"1537561593eb46303712693f27e9244fd2c076452057e95fe11981f58acf470d"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:14:26 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4945'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '55'), ('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', 'ECB9:1A94FB:8622E49:876A086:65A83C5D')] +{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/smk-org","repos_url":"https://api.github.com/orgs/smk-org/repos","events_url":"https://api.github.com/orgs/smk-org/events","hooks_url":"https://api.github.com/orgs/smk-org/hooks","issues_url":"https://api.github.com/orgs/smk-org/issues","members_url":"https://api.github.com/orgs/smk-org/members{/member}","public_members_url":"https://api.github.com/orgs/smk-org/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":1,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/smk-org","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T20:14:26Z","archived_at":null,"type":"Organization"} + +https +GET +api.github.com +None +/repos/smk-org/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"d23ab888da5a555b387d597b228c970db5080a539b65e689fe12b96b6e8d0ada"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-accepted-github-permissions', 'metadata=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4944'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '56'), ('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', 'ECBA:4E5F5:7D2F2A1:7E767A6:65A83C5E')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"smk-org/demo-repo-1","private":false,"owner":{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/smk-org","html_url":"https://github.com/smk-org","followers_url":"https://api.github.com/users/smk-org/followers","following_url":"https://api.github.com/users/smk-org/following{/other_user}","gists_url":"https://api.github.com/users/smk-org/gists{/gist_id}","starred_url":"https://api.github.com/users/smk-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smk-org/subscriptions","organizations_url":"https://api.github.com/users/smk-org/orgs","repos_url":"https://api.github.com/users/smk-org/repos","events_url":"https://api.github.com/users/smk-org/events{/privacy}","received_events_url":"https://api.github.com/users/smk-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smk-org/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/smk-org/demo-repo-1","forks_url":"https://api.github.com/repos/smk-org/demo-repo-1/forks","keys_url":"https://api.github.com/repos/smk-org/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smk-org/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smk-org/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/smk-org/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/smk-org/demo-repo-1/events","assignees_url":"https://api.github.com/repos/smk-org/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/smk-org/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/smk-org/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smk-org/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/smk-org/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/smk-org/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/smk-org/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/smk-org/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/smk-org/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/smk-org/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/smk-org/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/smk-org/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/smk-org/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smk-org/demo-repo-1/merges","archive_url":"https://api.github.com/repos/smk-org/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smk-org/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/smk-org/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/smk-org/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/smk-org/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smk-org/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/smk-org/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/smk-org/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/smk-org/demo-repo-1.git","ssh_url":"git@github.com:smk-org/demo-repo-1.git","clone_url":"https://github.com/smk-org/demo-repo-1.git","svn_url":"https://github.com/smk-org/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"custom_properties":{},"organization":{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/smk-org","html_url":"https://github.com/smk-org","followers_url":"https://api.github.com/users/smk-org/followers","following_url":"https://api.github.com/users/smk-org/following{/other_user}","gists_url":"https://api.github.com/users/smk-org/gists{/gist_id}","starred_url":"https://api.github.com/users/smk-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smk-org/subscriptions","organizations_url":"https://api.github.com/users/smk-org/orgs","repos_url":"https://api.github.com/users/smk-org/repos","events_url":"https://api.github.com/users/smk-org/events{/privacy}","received_events_url":"https://api.github.com/users/smk-org/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":0} diff --git a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt new file mode 100644 index 0000000000..2d0afcd297 --- /dev/null +++ b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt @@ -0,0 +1,20 @@ +https +GET +api.github.com +None +/orgs/smk-org/actions/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 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/"3b2d45d9bbbf76c44174d65123aa44db44ecb801c36bf9a1606221f0a5f5d46f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '45'), ('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', 'ECAF:1AC273:7CD4C72:7E1918F:65A83C58')] +{"key_id":"3380204578043523366","key":"lEcXo0mlVf630hnPSTSCuXmGo2CxuIAKT7RRvZ1QjB4="} + +https +PUT +api.github.com +None +/orgs/smk-org/actions/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} +204 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4954'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '46'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB0:4E5F5:7D2DFFD:7E754C0:65A83C59')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt new file mode 100644 index 0000000000..1f95381a29 --- /dev/null +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt @@ -0,0 +1,20 @@ +https +GET +api.github.com +None +/orgs/smk-org/dependabot/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 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/"c2c075d4cc3f51f6dc60e972878b8d2e5b9fa71ed8d89765c86e22d7f0b34fb4"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4951'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '49'), ('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', 'ECB3:120C7D:11EC462:121A710:65A83C5A')] +{"key_id":"3380217566468950943","key":"HYk6AFuoV0iI+t+geHowOxji1OKAGW6GtngRFeETM14="} + +https +PUT +api.github.com +None +/orgs/smk-org/dependabot/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} +204 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4950'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '50'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB4:1A94FB:862249C:87696D6:65A83C5B')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt new file mode 100644 index 0000000000..bb1d2d45c0 --- /dev/null +++ b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt @@ -0,0 +1,20 @@ +https +GET +api.github.com +None +/repos/smk-org/demo-repo-1/actions/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:16 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/"694d815f34882d38acf82f7e1b219c603379faf269e98b8ccc0f72146307e04a"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4947'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '53'), ('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', 'ECB7:120C7D:11ECAFE:121AD9E:65A83C5C')] +{"key_id":"3380204578043523366","key":"oWxGlztcubVOX/ehKONYj83dSjyS4BZphl6dC6L6W3U="} + +https +PUT +api.github.com +None +/repos/smk-org/demo-repo-1/actions/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} +204 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4946'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '54'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB8:120C7D:11ECC8D:121AF3C:65A83C5D')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt new file mode 100644 index 0000000000..bc0c5237f4 --- /dev/null +++ b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt @@ -0,0 +1,20 @@ +https +GET +api.github.com +None +/repos/smk-org/demo-repo-1/dependabot/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"89b92808460d4b40e0a9ee4eeb32de66600634b1dbe3cfd0c277035c2551766f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4943'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '57'), ('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', 'ECBB:27E4D9:7D0FDAF:7E540BC:65A83C5E')] +{"key_id":"3380217566468950943","key":"zMhrH6T/7s0pnAFGSEVKt8nH5XTuCdTIhNcSBgdeeyQ="} + +https +PUT +api.github.com +None +/repos/smk-org/demo-repo-1/dependabot/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} +204 +[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:19 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4942'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '58'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECBC:1A94FB:862341B:876A651:65A83C5F')] diff --git a/tests/Repository.py b/tests/Repository.py index de1c49ce10..520e591f96 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -481,20 +481,6 @@ def testCreateRepositoryDispatch(self): without_payload = self.repo.create_repository_dispatch("type") self.assertTrue(without_payload) - @mock.patch("github.PublicKey.encrypt") - def testCreateActionsSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret-name", "secret-value", "actions") - self.assertIsNotNone(secret) - - @mock.patch("github.PublicKey.encrypt") - def testCreateDependabotSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret-name", "secret-value", "dependabot") - self.assertIsNotNone(secret) - @mock.patch("github.PublicKey.encrypt") def testRepoSecrets(self, encrypt): # encrypt returns a non-deterministic value, we need to mock it so the replay data matches From f02213f89e23507c322a24fdf4cf2e3730adb68b Mon Sep 17 00:00:00 2001 From: Sean Killen Date: Wed, 17 Jan 2024 20:59:32 +0000 Subject: [PATCH 10/22] Refactoring Tests , tidying up and making PyTest pass --- tests/ReplayData/Issue2284.setUp.txt | 4 ++-- .../Issue2284.testCreateActionsSecret.txt | 4 ++-- .../Issue2284.testCreateDependabotSecret.txt | 4 ++-- .../Issue2284.testCreateRepoActionsSecret.txt | 4 ++-- ...sue2284.testCreateRepoDependabotSecret.txt | 4 ++-- .../Organization.testCreateActionsSecret.txt | 21 ------------------- ...rganization.testCreateDependabotSecret.txt | 21 ------------------- .../Repository.testCreateActionsSecret.txt | 21 ------------------- .../Repository.testCreateDependabotSecret.txt | 21 ------------------- 9 files changed, 10 insertions(+), 94 deletions(-) delete mode 100644 tests/ReplayData/Organization.testCreateActionsSecret.txt delete mode 100644 tests/ReplayData/Organization.testCreateDependabotSecret.txt delete mode 100644 tests/ReplayData/Repository.testCreateActionsSecret.txt delete mode 100644 tests/ReplayData/Repository.testCreateDependabotSecret.txt diff --git a/tests/ReplayData/Issue2284.setUp.txt b/tests/ReplayData/Issue2284.setUp.txt index 2645e668ec..be60b57cb0 100644 --- a/tests/ReplayData/Issue2284.setUp.txt +++ b/tests/ReplayData/Issue2284.setUp.txt @@ -3,7 +3,7 @@ GET api.github.com None /orgs/smk-org -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 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/"1537561593eb46303712693f27e9244fd2c076452057e95fe11981f58acf470d"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:14:26 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4945'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '55'), ('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', 'ECB9:1A94FB:8622E49:876A086:65A83C5D')] @@ -14,7 +14,7 @@ GET api.github.com None /repos/smk-org/demo-repo-1 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"d23ab888da5a555b387d597b228c970db5080a539b65e689fe12b96b6e8d0ada"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-accepted-github-permissions', 'metadata=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4944'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '56'), ('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', 'ECBA:4E5F5:7D2F2A1:7E767A6:65A83C5E')] diff --git a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt index 2d0afcd297..fba83d18e1 100644 --- a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt @@ -3,7 +3,7 @@ GET api.github.com None /orgs/smk-org/actions/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 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/"3b2d45d9bbbf76c44174d65123aa44db44ecb801c36bf9a1606221f0a5f5d46f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '45'), ('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', 'ECAF:1AC273:7CD4C72:7E1918F:65A83C58')] @@ -14,7 +14,7 @@ PUT api.github.com None /orgs/smk-org/actions/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4954'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '46'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB0:4E5F5:7D2DFFD:7E754C0:65A83C59')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt index 1f95381a29..c183a7a32a 100644 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt @@ -3,7 +3,7 @@ GET api.github.com None /orgs/smk-org/dependabot/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 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/"c2c075d4cc3f51f6dc60e972878b8d2e5b9fa71ed8d89765c86e22d7f0b34fb4"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4951'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '49'), ('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', 'ECB3:120C7D:11EC462:121A710:65A83C5A')] @@ -14,7 +14,7 @@ PUT api.github.com None /orgs/smk-org/dependabot/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4950'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '50'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB4:1A94FB:862249C:87696D6:65A83C5B')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt index bb1d2d45c0..ad3cf60f77 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt @@ -3,7 +3,7 @@ GET api.github.com None /repos/smk-org/demo-repo-1/actions/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:16 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/"694d815f34882d38acf82f7e1b219c603379faf269e98b8ccc0f72146307e04a"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4947'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '53'), ('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', 'ECB7:120C7D:11ECAFE:121AD9E:65A83C5C')] @@ -14,7 +14,7 @@ PUT api.github.com None /repos/smk-org/demo-repo-1/actions/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4946'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '54'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB8:120C7D:11ECC8D:121AF3C:65A83C5D')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt index bc0c5237f4..1e98d2db73 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt @@ -3,7 +3,7 @@ GET api.github.com None /repos/smk-org/demo-repo-1/dependabot/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"89b92808460d4b40e0a9ee4eeb32de66600634b1dbe3cfd0c277035c2551766f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4943'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '57'), ('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', 'ECBB:27E4D9:7D0FDAF:7E540BC:65A83C5E')] @@ -14,7 +14,7 @@ PUT api.github.com None /repos/smk-org/demo-repo-1/dependabot/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 [('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:19 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4942'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '58'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECBC:1A94FB:862341B:876A651:65A83C5F')] diff --git a/tests/ReplayData/Organization.testCreateActionsSecret.txt b/tests/ReplayData/Organization.testCreateActionsSecret.txt deleted file mode 100644 index be828cceaf..0000000000 --- a/tests/ReplayData/Organization.testCreateActionsSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/orgs/BeaverSoftware/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/orgs/BeaverSoftware/actions/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743", "visibility": "all"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} diff --git a/tests/ReplayData/Organization.testCreateDependabotSecret.txt b/tests/ReplayData/Organization.testCreateDependabotSecret.txt deleted file mode 100644 index 9eeab9602f..0000000000 --- a/tests/ReplayData/Organization.testCreateDependabotSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/orgs/BeaverSoftware/dependabot/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/orgs/BeaverSoftware/dependabot/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743", "visibility": "all"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} diff --git a/tests/ReplayData/Repository.testCreateActionsSecret.txt b/tests/ReplayData/Repository.testCreateActionsSecret.txt deleted file mode 100644 index 91169b37bd..0000000000 --- a/tests/ReplayData/Repository.testCreateActionsSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/repos/jacquev6/PyGithub/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/repos/jacquev6/PyGithub/actions/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} diff --git a/tests/ReplayData/Repository.testCreateDependabotSecret.txt b/tests/ReplayData/Repository.testCreateDependabotSecret.txt deleted file mode 100644 index 5f4dd97395..0000000000 --- a/tests/ReplayData/Repository.testCreateDependabotSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/repos/jacquev6/PyGithub/dependabot/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/repos/jacquev6/PyGithub/dependabot/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} From 337afb1086e2ca434f9773ec2f48be4fa80ff760 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:00:44 +0000 Subject: [PATCH 11/22] Update Repository.py --- github/Repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/Repository.py b/github/Repository.py index 97a5e799eb..52bae92190 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1704,7 +1704,7 @@ def create_secret( assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" secret_name = urllib.parse.quote(secret_name) - public_key = self.get_public_key(secret_type=secret_type) # TODO + public_key = self.get_public_key(secret_type=secret_type) payload = public_key.encrypt(unencrypted_value) put_parameters = { "key_id": public_key.key_id, From 14f3ceaa87559bf8f18bc4ab222bea1da07d09c0 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:26:23 +0000 Subject: [PATCH 12/22] add more tests to increase code coverage --- CONTRIBUTING.md | 11 +++- github/Organization.py | 8 ++- tests/Issue2284.py | 50 ++++++++++++++++- tests/Organization.py | 9 +++- tests/ReplayData/Issue2284.setUp.txt | 16 +++--- .../Issue2284.testCreateActionsSecret.txt | 14 ++--- .../Issue2284.testCreateDependabotSecret.txt | 14 ++--- ...284.testCreateDependabotSecretSelected.txt | 54 +++++++++++++++++++ .../Issue2284.testCreateRepoActionsSecret.txt | 14 ++--- ...sue2284.testCreateRepoDependabotSecret.txt | 14 ++--- .../Issue2284.testOrgSecretEdit.txt | 42 +++++++++++++++ 11 files changed, 206 insertions(+), 40 deletions(-) create mode 100644 tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt create mode 100644 tests/ReplayData/Issue2284.testOrgSecretEdit.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef1978619a..db83e72ad2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,16 @@ app_private_key = "my_app_private_key" # Can be left empty if not used ``` If you use 2 factor authentication on your Github account, tests that require a login/password authentication will fail. -You can use `pytest Issue139.testCompletion --record --auth_with_token` to use the `oauth_token` field specified in `GithubCredentials.py` when recording a unit test interaction. Note that the `password = ""` (empty string is ok) must still be present in `GithubCredentials.py` to run the tests even when the `--auth_with_token` arg is used. (Also note that if you record your test data with `--auth_with_token` then you also need to be in token authentication mode when running the test. A simple alternative is to replace `token private_token_removed` with `Basic login_and_password_removed` in all your newly generated ReplayData files.) +You can use `pytest Issue139.testCompletion --record --auth_with_token` to use the `oauth_token` field specified in `GithubCredentials.py` when recording a unit test interaction. Note that the `password = ""` (empty string is ok) must still be present in `GithubCredentials.py` to run the tests even when the `--auth_with_token` arg is used. + +Also note that if you record your test data with `--auth_with_token` then you also need to be in token authentication mode when running the test. You can do this by setting `tokenAuthMode` to be true like so: + +```python + def setUp(self): + self.tokenAuthMode = True +``` + +A simple alternative is to replace `token private_token_removed` with `Basic login_and_password_removed` in all your newly generated ReplayData files. Similarly, you can use `pytest Issue139.testCompletion --record --auth_with_jwt` to use the `jwt` field specified in `GithubCredentials.py` to access endpoints that require JWT. diff --git a/github/Organization.py b/github/Organization.py index 324aeb567a..cc3a6bae1f 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -604,7 +604,13 @@ def create_secret( "visibility": visibility, } if is_defined(selected_repositories): - put_parameters["selected_repository_ids"] = [element.id for element in selected_repositories] + # Dependbot and Actions endpoint expects different types + # https://docs.github.com/en/rest/dependabot/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + # https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + if secret_type == "actions": + put_parameters["selected_repository_ids"] = [element.id for element in selected_repositories] + if secret_type == "dependabot": + put_parameters["selected_repository_ids"] = [str(element.id) for element in selected_repositories] self._requester.requestJsonAndCheck( "PUT", f"{self.url}/{secret_type}/secrets/{urllib.parse.quote(secret_name)}", input=put_parameters diff --git a/tests/Issue2284.py b/tests/Issue2284.py index 90a17a5499..1b5c1fd9fb 100644 --- a/tests/Issue2284.py +++ b/tests/Issue2284.py @@ -5,9 +5,10 @@ class Issue2284(Framework.TestCase): def setUp(self): + self.tokenAuthMode = True super().setUp() self.user = self.g.get_user() - self.org = self.g.get_organization("smk-org") + self.org = self.g.get_organization("pygithubtest") self.repo = self.org.get_repo("demo-repo-1") @mock.patch("github.PublicKey.encrypt") @@ -37,3 +38,50 @@ def testCreateRepoDependabotSecret(self, encrypt): encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" secret = self.repo.create_secret("secret_name", "secret-value", "dependabot") self.assertIsNotNone(secret) + + def testRepoGetSecretAssertion(self): + try: + self.repo.get_secret(secret_name="splat", secret_type="supersecret") + except AssertionError: + assert True + + def testOrgGetSecretAssertion(self): + try: + self.org.get_secret(secret_name="splat", secret_type="supersecret") + except AssertionError: + assert True + + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecretSelected(self, encrypt): + repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret( + secret_name="secret_dep_name", + unencrypted_value="secret-value", + visibility="selected", + secret_type="dependabot", + selected_repositories=repos, + ) + + self.assertIsNotNone(secret) + self.assertEqual(secret.visibility, "selected") + self.assertEqual(list(secret.selected_repositories), repos) + + @mock.patch("github.PublicKey.encrypt") + def testOrgSecretEdit(self, encrypt): + repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret( + secret_name="secret_act_name", + unencrypted_value="secret-value", + visibility="selected", + secret_type="actions", + selected_repositories=repos, + ) + + try: + secret.edit(value="newvalue", secret_type="supersecret") + except AssertionError: + assert True diff --git a/tests/Organization.py b/tests/Organization.py index 45b9be637c..4a02719d2a 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -434,7 +434,14 @@ def testCreateSecretSelected(self, encrypt): repos = [self.org.get_repo("TestPyGithub"), self.org.get_repo("FatherBeaver")] # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret-name", "secret-value", "selected", "actions", repos) + secret = self.org.create_secret( + secret_name="secret-name", + unencrypted_value="secret-value", + visibility="selected", + secret_type="actions", + selected_repositories=repos, + ) + self.assertIsNotNone(secret) self.assertEqual(secret.visibility, "selected") self.assertEqual(list(secret.selected_repositories), repos) diff --git a/tests/ReplayData/Issue2284.setUp.txt b/tests/ReplayData/Issue2284.setUp.txt index be60b57cb0..309d773b68 100644 --- a/tests/ReplayData/Issue2284.setUp.txt +++ b/tests/ReplayData/Issue2284.setUp.txt @@ -2,20 +2,20 @@ https GET api.github.com None -/orgs/smk-org -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/orgs/pygithubtest +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 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/"1537561593eb46303712693f27e9244fd2c076452057e95fe11981f58acf470d"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:14:26 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4945'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '55'), ('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', 'ECB9:1A94FB:8622E49:876A086:65A83C5D')] -{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/smk-org","repos_url":"https://api.github.com/orgs/smk-org/repos","events_url":"https://api.github.com/orgs/smk-org/events","hooks_url":"https://api.github.com/orgs/smk-org/hooks","issues_url":"https://api.github.com/orgs/smk-org/issues","members_url":"https://api.github.com/orgs/smk-org/members{/member}","public_members_url":"https://api.github.com/orgs/smk-org/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":1,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/smk-org","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T20:14:26Z","archived_at":null,"type":"Organization"} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:42 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/"715f72aed2180b1c22631fb6039d703aab408f525a74031563b3743a98353919"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:20:20 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4930'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '70'), ('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', '35AB:2C7EC3:C22024E:C40565A:65A92622')] +{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","url":"https://api.github.com/orgs/pygithubtest","repos_url":"https://api.github.com/orgs/pygithubtest/repos","events_url":"https://api.github.com/orgs/pygithubtest/events","hooks_url":"https://api.github.com/orgs/pygithubtest/hooks","issues_url":"https://api.github.com/orgs/pygithubtest/issues","members_url":"https://api.github.com/orgs/pygithubtest/members{/member}","public_members_url":"https://api.github.com/orgs/pygithubtest/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":0,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/pygithubtest","created_at":"2024-01-18T10:20:20Z","updated_at":"2024-01-18T10:20:20Z","archived_at":null,"type":"Organization","total_private_repos":2,"owned_private_repos":2,"private_gists":0,"disk_usage":0,"collaborators":0,"billing_email":"crowleyt99@gmail.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":false,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":1,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} https GET api.github.com None -/repos/smk-org/demo-repo-1 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/repos/pygithubtest/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"d23ab888da5a555b387d597b228c970db5080a539b65e689fe12b96b6e8d0ada"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-accepted-github-permissions', 'metadata=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4944'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '56'), ('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', 'ECBA:4E5F5:7D2F2A1:7E767A6:65A83C5E')] -{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"smk-org/demo-repo-1","private":false,"owner":{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/smk-org","html_url":"https://github.com/smk-org","followers_url":"https://api.github.com/users/smk-org/followers","following_url":"https://api.github.com/users/smk-org/following{/other_user}","gists_url":"https://api.github.com/users/smk-org/gists{/gist_id}","starred_url":"https://api.github.com/users/smk-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smk-org/subscriptions","organizations_url":"https://api.github.com/users/smk-org/orgs","repos_url":"https://api.github.com/users/smk-org/repos","events_url":"https://api.github.com/users/smk-org/events{/privacy}","received_events_url":"https://api.github.com/users/smk-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smk-org/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/smk-org/demo-repo-1","forks_url":"https://api.github.com/repos/smk-org/demo-repo-1/forks","keys_url":"https://api.github.com/repos/smk-org/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smk-org/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smk-org/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/smk-org/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/smk-org/demo-repo-1/events","assignees_url":"https://api.github.com/repos/smk-org/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/smk-org/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/smk-org/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smk-org/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/smk-org/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/smk-org/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/smk-org/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/smk-org/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/smk-org/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/smk-org/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/smk-org/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/smk-org/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/smk-org/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/smk-org/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smk-org/demo-repo-1/merges","archive_url":"https://api.github.com/repos/smk-org/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smk-org/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/smk-org/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/smk-org/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/smk-org/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/smk-org/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smk-org/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/smk-org/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/smk-org/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/smk-org/demo-repo-1.git","ssh_url":"git@github.com:smk-org/demo-repo-1.git","clone_url":"https://github.com/smk-org/demo-repo-1.git","svn_url":"https://github.com/smk-org/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"custom_properties":{},"organization":{"login":"smk-org","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/smk-org","html_url":"https://github.com/smk-org","followers_url":"https://api.github.com/users/smk-org/followers","following_url":"https://api.github.com/users/smk-org/following{/other_user}","gists_url":"https://api.github.com/users/smk-org/gists{/gist_id}","starred_url":"https://api.github.com/users/smk-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smk-org/subscriptions","organizations_url":"https://api.github.com/users/smk-org/orgs","repos_url":"https://api.github.com/users/smk-org/repos","events_url":"https://api.github.com/users/smk-org/events{/privacy}","received_events_url":"https://api.github.com/users/smk-org/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":0} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:42 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4929'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '71'), ('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', 'BFD2:B5E87:8EB24CF:90406BF:65A92622')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3OEG55U2MXN47Q4MLDFVETU4","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} diff --git a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt index fba83d18e1..0837955ea6 100644 --- a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt @@ -2,19 +2,19 @@ https GET api.github.com None -/orgs/smk-org/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/orgs/pygithubtest/actions/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 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/"3b2d45d9bbbf76c44174d65123aa44db44ecb801c36bf9a1606221f0a5f5d46f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '45'), ('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', 'ECAF:1AC273:7CD4C72:7E1918F:65A83C58')] -{"key_id":"3380204578043523366","key":"lEcXo0mlVf630hnPSTSCuXmGo2CxuIAKT7RRvZ1QjB4="} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:31 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/"356ce214c26e7bc245afc7364e3676a07c3ed66cc3d3bac4589e3a2204b1bb35"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4959'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '41'), ('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', '722A:505BC:BB40AC3:BD25EFD:65A92617')] +{"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} https PUT api.github.com None -/orgs/smk-org/actions/secrets/secret_name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +/orgs/pygithubtest/actions/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:13 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4954'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '46'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB0:4E5F5:7D2DFFD:7E754C0:65A83C59')] +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:32 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4958'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '42'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D749:35F3E4:1FF350C:204B744:65A92617')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt index c183a7a32a..d819459c03 100644 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt @@ -2,19 +2,19 @@ https GET api.github.com None -/orgs/smk-org/dependabot/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/orgs/pygithubtest/dependabot/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 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/"c2c075d4cc3f51f6dc60e972878b8d2e5b9fa71ed8d89765c86e22d7f0b34fb4"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4951'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '49'), ('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', 'ECB3:120C7D:11EC462:121A710:65A83C5A')] -{"key_id":"3380217566468950943","key":"HYk6AFuoV0iI+t+geHowOxji1OKAGW6GtngRFeETM14="} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:33 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/"54dd2662902b3395d14387df1c2a369171def74124d1b9a4360f5b69bfe7d503"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '45'), ('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', '886B:3D780F:AF8AA07:B16C00C:65A92618')] +{"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} https PUT api.github.com None -/orgs/smk-org/dependabot/secrets/secret_name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +/orgs/pygithubtest/dependabot/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:15 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'organization_dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4950'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '50'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB4:1A94FB:862249C:87696D6:65A83C5B')] +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:33 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4954'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '46'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'F792:52EA7:BC57A9F:BE3CB75:65A92619')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt new file mode 100644 index 0000000000..c546d3ae50 --- /dev/null +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt @@ -0,0 +1,54 @@ +https +GET +api.github.com +None +/repos/pygithubtest/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4951'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '49'), ('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', 'D750:52EA7:BC57FBB:BE3D0AA:65A9261A')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3PJM5HXDJ7PEKDZOVLFVETUM","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} + +https +GET +api.github.com +None +/repos/pygithubtest/demo-repo-2 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4950'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '50'), ('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', '8529:1A94FB:BC12047:BDF708C:65A9261A')] +{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JTOT3CTJWH4HLOI3TFVETUM","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} + +https +GET +api.github.com +None +/orgs/pygithubtest/dependabot/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"54dd2662902b3395d14387df1c2a369171def74124d1b9a4360f5b69bfe7d503"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4949'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '51'), ('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', 'D752:3E975B:575053:581869:65A9261A')] +{"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} + +https +PUT +api.github.com +None +/orgs/pygithubtest/dependabot/secrets/secret_dep_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": ["744944349", "744964532"]} +204 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:35 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4948'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '52'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D753:3E975B:57519F:5819C7:65A9261B')] + + +https +GET +api.github.com +None +/orgs/pygithubtest/actions/secrets/secret_dep_name/repositories +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:35 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/"b34dba765fa383a8b79d41ec6ff069208c4c8bf0ca5344a181b9cfbb97651e34"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4947'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '53'), ('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', 'D754:1AC273:B07F0AD:B2603F8:65A9261B')] +{"total_count":2,"repositories":[{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments"},{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments"}]} diff --git a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt index ad3cf60f77..93e5c60a5e 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt @@ -2,19 +2,19 @@ https GET api.github.com None -/repos/smk-org/demo-repo-1/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/repos/pygithubtest/demo-repo-1/actions/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:16 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/"694d815f34882d38acf82f7e1b219c603379faf269e98b8ccc0f72146307e04a"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4947'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '53'), ('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', 'ECB7:120C7D:11ECAFE:121AD9E:65A83C5C')] -{"key_id":"3380204578043523366","key":"oWxGlztcubVOX/ehKONYj83dSjyS4BZphl6dC6L6W3U="} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:36 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/"db4c49db153de5ef4b17251d24b6c502dc5c67b649605f922ea7faa56ee5f960"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4944'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '56'), ('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', 'FDB6:4E5F5:B2246CC:B409A83:65A9261C')] +{"key_id":"3380204578043523366","key":"1cPRvymCqCcniLOQhPY0f68sXXLi+lGD3BWewVKITzo="} https PUT api.github.com None -/repos/smk-org/demo-repo-1/actions/secrets/secret_name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +/repos/pygithubtest/demo-repo-1/actions/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:17 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4946'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '54'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECB8:120C7D:11ECC8D:121AF3C:65A83C5D')] +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:36 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4943'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '57'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', '2416:2C7EC3:C21E5A3:C40397F:65A9261C')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt index 1e98d2db73..561d0534cc 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt @@ -2,19 +2,19 @@ https GET api.github.com None -/repos/smk-org/demo-repo-1/dependabot/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +/repos/pygithubtest/demo-repo-1/dependabot/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:18 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/"89b92808460d4b40e0a9ee4eeb32de66600634b1dbe3cfd0c277035c2551766f"'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=read'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4943'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '57'), ('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', 'ECBB:27E4D9:7D0FDAF:7E540BC:65A83C5E')] -{"key_id":"3380217566468950943","key":"zMhrH6T/7s0pnAFGSEVKt8nH5XTuCdTIhNcSBgdeeyQ="} +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:37 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/"cbe828e95100d71f3ef46e5bca6b38e25199745b172ac7e2ec58a67ae68f8b95"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4940'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '60'), ('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', 'D75B:220AD1:AAE016E:ACC53BA:65A9261D')] +{"key_id":"3380217566468950943","key":"8KBECZq62xav+jd9pW01mgyzQWZrDrnQGwvxVbx1MjU="} https PUT api.github.com None -/repos/smk-org/demo-repo-1/dependabot/secrets/secret_name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +/repos/pygithubtest/demo-repo-1/dependabot/secrets/secret_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 -[('Server', 'GitHub.com'), ('Date', 'Wed, 17 Jan 2024 20:45:19 GMT'), ('github-authentication-token-expiration', '2024-04-16 20:21:06 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'dependabot_secrets=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4942'), ('X-RateLimit-Reset', '1705526969'), ('X-RateLimit-Used', '58'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ECBC:1A94FB:862341B:876A651:65A83C5F')] +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:38 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4939'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '61'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D75C:225771:BCAC0F5:BE914B4:65A9261D')] diff --git a/tests/ReplayData/Issue2284.testOrgSecretEdit.txt b/tests/ReplayData/Issue2284.testOrgSecretEdit.txt new file mode 100644 index 0000000000..084f91f990 --- /dev/null +++ b/tests/ReplayData/Issue2284.testOrgSecretEdit.txt @@ -0,0 +1,42 @@ +https +GET +api.github.com +None +/repos/pygithubtest/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:40 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4934'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '66'), ('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', 'F911:2C7EC3:C21FA42:C404E3B:65A92620')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JJDMBEOHBT5Y7WUCTFVETUY","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} + +https +GET +api.github.com +None +/repos/pygithubtest/demo-repo-2 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4933'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '67'), ('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', '9E97:225771:BCACFBD:BE92396:65A92620')] +{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JLWUDCYFY62DED5JDFVETU2","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} + +https +GET +api.github.com +None +/orgs/pygithubtest/actions/secrets/public-key +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 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/"356ce214c26e7bc245afc7364e3676a07c3ed66cc3d3bac4589e3a2204b1bb35"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4932'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '68'), ('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', '90AB:4E5F5:B225EBC:B40B290:65A92621')] +{"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} + +https +PUT +api.github.com +None +/orgs/pygithubtest/actions/secrets/secret_act_name +{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": [744944349, 744964532]} +204 +[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4931'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '69'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'FD8A:120C7D:456FC90:463AF13:65A92621')] From 1bb3d91b7c9c191a8cf9f60a0024f83902571341 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:30:52 +0000 Subject: [PATCH 13/22] address review comments --- github/Organization.py | 8 +++++++- github/OrganizationSecret.py | 2 +- tests/ReplayData/Issue2284.setUp.txt | 6 +++--- .../Issue2284.testCreateActionsSecret.txt | 4 ++-- .../Issue2284.testCreateDependabotSecret.txt | 4 ++-- ...ssue2284.testCreateDependabotSecretSelected.txt | 14 +++++++------- .../Issue2284.testCreateRepoActionsSecret.txt | 4 ++-- .../Issue2284.testCreateRepoDependabotSecret.txt | 4 ++-- tests/ReplayData/Issue2284.testOrgSecretEdit.txt | 12 ++++++------ 9 files changed, 32 insertions(+), 26 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index cc3a6bae1f..d145a4f69b 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -578,10 +578,16 @@ def create_secret( secret_name: str, unencrypted_value: str, visibility: str = "all", - secret_type: str = "actions", selected_repositories: Opt[list[github.Repository.Repository]] = NotSet, + secret_type: str = "actions", ) -> github.OrganizationSecret.OrganizationSecret: """ + :param secret_name: string name of the secret + :param unencrypted_value: string plain text value of the secret + :visibility: string options all or selected + :selected_repositories: list of repositrories that the secret will be available in + :param secret_type: string options actions or dependabot + :calls: `PUT /orgs/{org}/{secret_type}/secrets/{secret_name} `_ """ assert isinstance(secret_name, str), secret_name diff --git a/github/OrganizationSecret.py b/github/OrganizationSecret.py index 1e29d80b96..78f6715294 100644 --- a/github/OrganizationSecret.py +++ b/github/OrganizationSecret.py @@ -65,8 +65,8 @@ def selected_repositories(self) -> PaginatedList[Repository]: def edit( self, value: str, - secret_type: str = "actions", visibility: str = "all", + secret_type: str = "actions", ) -> bool: """ :calls: `PATCH /orgs/{org}/{secret_type}/secrets/{variable_name} `_ diff --git a/tests/ReplayData/Issue2284.setUp.txt b/tests/ReplayData/Issue2284.setUp.txt index 309d773b68..8cbd76d166 100644 --- a/tests/ReplayData/Issue2284.setUp.txt +++ b/tests/ReplayData/Issue2284.setUp.txt @@ -6,7 +6,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:42 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/"715f72aed2180b1c22631fb6039d703aab408f525a74031563b3743a98353919"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:20:20 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4930'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '70'), ('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', '35AB:2C7EC3:C22024E:C40565A:65A92622')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:55 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/"ad5904f3090e79bbf4b0ab98f052607fa598d96ece53d4ff19b5a40204f57c9a"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:20:20 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4565'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '435'), ('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', 'CBF6:3E975B:11D54BB3:1210F237:65AE97C6')] {"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","url":"https://api.github.com/orgs/pygithubtest","repos_url":"https://api.github.com/orgs/pygithubtest/repos","events_url":"https://api.github.com/orgs/pygithubtest/events","hooks_url":"https://api.github.com/orgs/pygithubtest/hooks","issues_url":"https://api.github.com/orgs/pygithubtest/issues","members_url":"https://api.github.com/orgs/pygithubtest/members{/member}","public_members_url":"https://api.github.com/orgs/pygithubtest/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":0,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/pygithubtest","created_at":"2024-01-18T10:20:20Z","updated_at":"2024-01-18T10:20:20Z","archived_at":null,"type":"Organization","total_private_repos":2,"owned_private_repos":2,"private_gists":0,"disk_usage":0,"collaborators":0,"billing_email":"crowleyt99@gmail.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":false,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":1,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} https @@ -17,5 +17,5 @@ None {'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:42 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4929'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '71'), ('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', 'BFD2:B5E87:8EB24CF:90406BF:65A92622')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3OEG55U2MXN47Q4MLDFVETU4","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:55 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4564'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '436'), ('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', 'CBF7:2C7EC3:1F9D4BBF:1FF67CBB:65AE97C7')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3MIP3VMKE675IYJD63FV2MPG","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} diff --git a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt index 0837955ea6..77f6e30957 100644 --- a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt @@ -6,7 +6,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:31 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/"356ce214c26e7bc245afc7364e3676a07c3ed66cc3d3bac4589e3a2204b1bb35"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4959'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '41'), ('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', '722A:505BC:BB40AC3:BD25EFD:65A92617')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:42 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/"2b8b225f87a91829681446cb1506098cc275881e8ff4bf8b50aa235957de7064"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4594'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '406'), ('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', 'CBBE:2C6D2F:1CA0572A:1CF86233:65AE97BA')] {"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} https @@ -17,4 +17,4 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:32 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4958'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '42'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D749:35F3E4:1FF350C:204B744:65A92617')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:42 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4593'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '407'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBBF:3D780F:1DA0F84A:1DF984FB:65AE97BA')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt index d819459c03..019a9a0f8f 100644 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt @@ -6,7 +6,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:33 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/"54dd2662902b3395d14387df1c2a369171def74124d1b9a4360f5b69bfe7d503"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4955'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '45'), ('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', '886B:3D780F:AF8AA07:B16C00C:65A92618')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:43 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/"e261f6c5e726fa8d18218be1e2526dde7de53adec8a9a0f1f24a740cf14b0bdc"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4590'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '410'), ('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', 'CBC5:90E78:6D82A7F:6F03CFA:65AE97BB')] {"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} https @@ -17,4 +17,4 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:33 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4954'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '46'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'F792:52EA7:BC57A9F:BE3CB75:65A92619')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:44 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4589'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '411'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBC7:28577B:6A73FE:6B5F14:65AE97BC')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt index c546d3ae50..b4721fcb35 100644 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt +++ b/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt @@ -6,8 +6,8 @@ None {'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4951'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '49'), ('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', 'D750:52EA7:BC57FBB:BE3D0AA:65A9261A')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3PJM5HXDJ7PEKDZOVLFVETUM","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:45 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4586'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '414'), ('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', 'CBCD:1E5887:8A87D7F:8C5D3F8:65AE97BD')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JKPMOW3KLK7B3H6JTFV2MOS","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} https GET @@ -17,8 +17,8 @@ None {'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4950'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '50'), ('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', '8529:1A94FB:BC12047:BDF708C:65A9261A')] -{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JTOT3CTJWH4HLOI3TFVETUM","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:45 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4585'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '415'), ('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', 'CBCF:329237:4013D9B:40DAC23:65AE97BD')] +{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3M5WP755C4PKE3XWPTFV2MOS","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} https GET @@ -28,7 +28,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:34 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/"54dd2662902b3395d14387df1c2a369171def74124d1b9a4360f5b69bfe7d503"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4949'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '51'), ('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', 'D752:3E975B:575053:581869:65A9261A')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:46 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/"e261f6c5e726fa8d18218be1e2526dde7de53adec8a9a0f1f24a740cf14b0bdc"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4584'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '416'), ('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', 'CBD3:D37E1:1DA74C2:1DE84DD:65AE97BE')] {"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} https @@ -39,7 +39,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": ["744944349", "744964532"]} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:35 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4948'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '52'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D753:3E975B:57519F:5819C7:65A9261B')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:46 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4583'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '417'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBD5:354E89:115D2D24:1195C323:65AE97BE')] https @@ -50,5 +50,5 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:35 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/"b34dba765fa383a8b79d41ec6ff069208c4c8bf0ca5344a181b9cfbb97651e34"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4947'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '53'), ('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', 'D754:1AC273:B07F0AD:B2603F8:65A9261B')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:47 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/"199092091dbcb6f81920710419f6e08fa7d6bcff69249602b8084d590bedeb82"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4582'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '418'), ('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', 'CBD7:3E975B:11D527D4:1210CE3A:65AE97BE')] {"total_count":2,"repositories":[{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments"},{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments"}]} diff --git a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt index 93e5c60a5e..1b2a3c92e6 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt @@ -6,7 +6,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:36 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/"db4c49db153de5ef4b17251d24b6c502dc5c67b649605f922ea7faa56ee5f960"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4944'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '56'), ('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', 'FDB6:4E5F5:B2246CC:B409A83:65A9261C')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:48 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/"71826100a85192e8730122ab1a60efcd7efe0da05ed2620b491eee3aef82a924"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4579'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '421'), ('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', 'CBDD:37F3C9:16FA647:172D9EB:65AE97BF')] {"key_id":"3380204578043523366","key":"1cPRvymCqCcniLOQhPY0f68sXXLi+lGD3BWewVKITzo="} https @@ -17,4 +17,4 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:36 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4943'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '57'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', '2416:2C7EC3:C21E5A3:C40397F:65A9261C')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:48 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4578'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '422'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBDE:2C6D2F:1CA07628:1CF881B8:65AE97C0')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt index 561d0534cc..da443d6f59 100644 --- a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt +++ b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt @@ -6,7 +6,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:37 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/"cbe828e95100d71f3ef46e5bca6b38e25199745b172ac7e2ec58a67ae68f8b95"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4940'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '60'), ('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', 'D75B:220AD1:AAE016E:ACC53BA:65A9261D')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:51 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/"92ac05f857abb283e3ce94c54a018dc2e01b9afef4549119d7d15f467152c264"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4575'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '425'), ('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', 'CBE5:2C7EC3:1F9D35F8:1FF666EF:65AE97C2')] {"key_id":"3380217566468950943","key":"8KBECZq62xav+jd9pW01mgyzQWZrDrnQGwvxVbx1MjU="} https @@ -17,4 +17,4 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:38 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4939'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '61'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'D75C:225771:BCAC0F5:BE914B4:65A9261D')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:51 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4574'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '426'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBE7:1AC273:1DFB3DA0:1E53C3B3:65AE97C3')] diff --git a/tests/ReplayData/Issue2284.testOrgSecretEdit.txt b/tests/ReplayData/Issue2284.testOrgSecretEdit.txt index 084f91f990..d925983bac 100644 --- a/tests/ReplayData/Issue2284.testOrgSecretEdit.txt +++ b/tests/ReplayData/Issue2284.testOrgSecretEdit.txt @@ -6,8 +6,8 @@ None {'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:40 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4934'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '66'), ('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', 'F911:2C7EC3:C21FA42:C404E3B:65A92620')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JJDMBEOHBT5Y7WUCTFVETUY","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4569'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '431'), ('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', 'CBEF:2C6D2F:1CA08F22:1CF89AB6:65AE97C5')] +{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3LNRYVZLWSXLTYXEU3FV2MPC","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} https GET @@ -17,8 +17,8 @@ None {'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4933'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '67'), ('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', '9E97:225771:BCACFBD:BE92396:65A92620')] -{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JLWUDCYFY62DED5JDFVETU2","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4568'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '432'), ('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', 'CBF1:D37E1:1DA9556:1DEA5C6:65AE97C5')] +{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3L7HZXO42THKTFBKJ3FV2MPC","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} https GET @@ -28,7 +28,7 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 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/"356ce214c26e7bc245afc7364e3676a07c3ed66cc3d3bac4589e3a2204b1bb35"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4932'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '68'), ('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', '90AB:4E5F5:B225EBC:B40B290:65A92621')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"2b8b225f87a91829681446cb1506098cc275881e8ff4bf8b50aa235957de7064"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4567'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '433'), ('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', 'CBF2:3E975B:11D54882:1210EF00:65AE97C6')] {"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} https @@ -39,4 +39,4 @@ None {'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} {"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": [744944349, 744964532]} 204 -[('Server', 'GitHub.com'), ('Date', 'Thu, 18 Jan 2024 13:22:41 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-01-25 10:23:13 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4931'), ('X-RateLimit-Reset', '1705586358'), ('X-RateLimit-Used', '69'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'FD8A:120C7D:456FC90:463AF13:65A92621')] +[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:54 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4566'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '434'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBF4:1AC273:1DFB4D75:1E53D3A9:65AE97C6')] From b4ddf7ec6ab45117f7a22e3a78dc347a290c9119 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:10:32 +0000 Subject: [PATCH 14/22] address review comments --- CONTRIBUTING.md | 2 ++ github/Organization.py | 1 + github/OrganizationSecret.py | 1 + github/Repository.py | 1 + 4 files changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db83e72ad2..17efde6c33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,8 @@ Also note that if you record your test data with `--auth_with_token` then you al ```python def setUp(self): self.tokenAuthMode = True + super().setUp() + ... ``` A simple alternative is to replace `token private_token_removed` with `Basic login_and_password_removed` in all your newly generated ReplayData files. diff --git a/github/Organization.py b/github/Organization.py index d145a4f69b..a708f3447b 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -1023,6 +1023,7 @@ def convert_to_outside_collaborator(self, member: NamedUser) -> None: def get_public_key(self, secret_type: str = "actions") -> PublicKey: """ :calls: `GET /orgs/{org}/{secret_type}/secrets/public-key `_ + :param secret_type: string options actions or dependabot :rtype: :class:`github.PublicKey.PublicKey` """ headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/{secret_type}/secrets/public-key") diff --git a/github/OrganizationSecret.py b/github/OrganizationSecret.py index 78f6715294..e7cdca7b6a 100644 --- a/github/OrganizationSecret.py +++ b/github/OrganizationSecret.py @@ -73,6 +73,7 @@ def edit( :param variable_name: string :param value: string :param visibility: string + :param secret_type: string options actions or dependabot :rtype: bool """ assert isinstance(value, str), value diff --git a/github/Repository.py b/github/Repository.py index 52bae92190..c42b305b5f 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -3009,6 +3009,7 @@ def get_network_events(self) -> PaginatedList[Event]: def get_public_key(self, secret_type: str = "actions") -> PublicKey: """ :calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key `_ + :param secret_type: string options actions or dependabot :rtype: :class:`github.PublicKey.PublicKey` """ assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" From 9a81ceb4c195a1759ceb63756216a475ec0b6098 Mon Sep 17 00:00:00 2001 From: smkillen Date: Mon, 5 Feb 2024 11:28:18 +0000 Subject: [PATCH 15/22] Moving tests to respective files (#3) * Moving tests to respective files * Correcting typo * Correcting typo * Creating ReplayData and Fixing tests, updating Organization.py to take secret_type on secrets call --- github/Organization.py | 2 +- tests/Issue2284.py | 87 ------------------- tests/Organization.py | 60 +++++++++++++ tests/ReplayData/Issue2284.setUp.txt | 21 ----- .../Issue2284.testCreateActionsSecret.txt | 20 ----- .../Issue2284.testCreateDependabotSecret.txt | 20 ----- ...284.testCreateDependabotSecretSelected.txt | 54 ------------ .../Issue2284.testCreateRepoActionsSecret.txt | 20 ----- ...sue2284.testCreateRepoDependabotSecret.txt | 20 ----- .../Issue2284.testOrgSecretEdit.txt | 42 --------- .../Organization.testCreateActionsSecret.txt | 32 +++++++ ...rganization.testCreateDependabotSecret.txt | 32 +++++++ ...ion.testCreateDependabotSecretSelected.txt | 65 ++++++++++++++ ...Organization.testOrgGetSecretAssertion.txt | 10 +++ .../Organization.testOrgSecretEdit.txt | 53 +++++++++++ ...Repository.testCreateRepoActionsSecret.txt | 32 +++++++ ...ository.testCreateRepoDependabotSecret.txt | 32 +++++++ .../Repository.testRepoGetSecretAssertion.txt | 10 +++ tests/Repository.py | 23 +++++ 19 files changed, 350 insertions(+), 285 deletions(-) delete mode 100644 tests/Issue2284.py delete mode 100644 tests/ReplayData/Issue2284.setUp.txt delete mode 100644 tests/ReplayData/Issue2284.testCreateActionsSecret.txt delete mode 100644 tests/ReplayData/Issue2284.testCreateDependabotSecret.txt delete mode 100644 tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt delete mode 100644 tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt delete mode 100644 tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt delete mode 100644 tests/ReplayData/Issue2284.testOrgSecretEdit.txt create mode 100644 tests/ReplayData/Organization.testCreateActionsSecret.txt create mode 100644 tests/ReplayData/Organization.testCreateDependabotSecret.txt create mode 100644 tests/ReplayData/Organization.testCreateDependabotSecretSelected.txt create mode 100644 tests/ReplayData/Organization.testOrgGetSecretAssertion.txt create mode 100644 tests/ReplayData/Organization.testOrgSecretEdit.txt create mode 100644 tests/ReplayData/Repository.testCreateRepoActionsSecret.txt create mode 100644 tests/ReplayData/Repository.testCreateRepoDependabotSecret.txt create mode 100644 tests/ReplayData/Repository.testRepoGetSecretAssertion.txt diff --git a/github/Organization.py b/github/Organization.py index a708f3447b..8e42280b7d 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -628,7 +628,7 @@ def create_secret( attributes={ "name": secret_name, "visibility": visibility, - "selected_repositories_url": f"{self.url}/actions/secrets/{urllib.parse.quote(secret_name)}/repositories", + "selected_repositories_url": f"{self.url}/{secret_type}/secrets/{urllib.parse.quote(secret_name)}/repositories", "url": f"{self.url}/{secret_type}/secrets/{urllib.parse.quote(secret_name)}", }, completed=False, diff --git a/tests/Issue2284.py b/tests/Issue2284.py deleted file mode 100644 index 1b5c1fd9fb..0000000000 --- a/tests/Issue2284.py +++ /dev/null @@ -1,87 +0,0 @@ -from unittest import mock - -from . import Framework - - -class Issue2284(Framework.TestCase): - def setUp(self): - self.tokenAuthMode = True - super().setUp() - self.user = self.g.get_user() - self.org = self.g.get_organization("pygithubtest") - self.repo = self.org.get_repo("demo-repo-1") - - @mock.patch("github.PublicKey.encrypt") - def testCreateActionsSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret_name", "secret-value", visibility="all") - self.assertIsNotNone(secret) - - @mock.patch("github.PublicKey.encrypt") - def testCreateDependabotSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all") - self.assertIsNotNone(secret) - - @mock.patch("github.PublicKey.encrypt") - def testCreateRepoActionsSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret_name", "secret-value", "actions") - self.assertIsNotNone(secret) - - @mock.patch("github.PublicKey.encrypt") - def testCreateRepoDependabotSecret(self, encrypt): - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.repo.create_secret("secret_name", "secret-value", "dependabot") - self.assertIsNotNone(secret) - - def testRepoGetSecretAssertion(self): - try: - self.repo.get_secret(secret_name="splat", secret_type="supersecret") - except AssertionError: - assert True - - def testOrgGetSecretAssertion(self): - try: - self.org.get_secret(secret_name="splat", secret_type="supersecret") - except AssertionError: - assert True - - @mock.patch("github.PublicKey.encrypt") - def testCreateDependabotSecretSelected(self, encrypt): - repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret( - secret_name="secret_dep_name", - unencrypted_value="secret-value", - visibility="selected", - secret_type="dependabot", - selected_repositories=repos, - ) - - self.assertIsNotNone(secret) - self.assertEqual(secret.visibility, "selected") - self.assertEqual(list(secret.selected_repositories), repos) - - @mock.patch("github.PublicKey.encrypt") - def testOrgSecretEdit(self, encrypt): - repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] - # encrypt returns a non-deterministic value, we need to mock it so the replay data matches - encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret( - secret_name="secret_act_name", - unencrypted_value="secret-value", - visibility="selected", - secret_type="actions", - selected_repositories=repos, - ) - - try: - secret.edit(value="newvalue", secret_type="supersecret") - except AssertionError: - assert True diff --git a/tests/Organization.py b/tests/Organization.py index 4a02719d2a..2c61217099 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -569,3 +569,63 @@ def testGetVariable(self): def testGetVariables(self): variables = self.org.get_variables() self.assertEqual(len(list(variables)), 1) + + @mock.patch("github.PublicKey.encrypt") + def testCreateActionsSecret(self, encrypt): + self.org = self.g.get_organization("demoorg") + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret("secret_name", "secret-value", visibility="all") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecret(self, encrypt): + self.org = self.g.get_organization("demoorg") + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all") + self.assertIsNotNone(secret) + + def testOrgGetSecretAssertion(self): + self.org = self.g.get_organization("demoorg") + try: + self.org.get_secret(secret_name="splat", secret_type="supersecret") + except AssertionError: + assert True + + @mock.patch("github.PublicKey.encrypt") + def testCreateDependabotSecretSelected(self, encrypt): + self.org = self.g.get_organization("demoorg") + repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret( + secret_name="SECRET_DEP_NAME", + unencrypted_value="secret-value", + visibility="selected", + secret_type="dependabot", + selected_repositories=repos, + ) + + self.assertIsNotNone(secret) + self.assertEqual(secret.visibility, "selected") + self.assertEqual(list(secret.selected_repositories), repos) + + @mock.patch("github.PublicKey.encrypt") + def testOrgSecretEdit(self, encrypt): + self.org = self.g.get_organization("demoorg") + repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = self.org.create_secret( + secret_name="secret_act_name", + unencrypted_value="secret-value", + visibility="selected", + secret_type="actions", + selected_repositories=repos, + ) + + try: + secret.edit(value="newvalue", secret_type="supersecret") + except AssertionError: + assert True diff --git a/tests/ReplayData/Issue2284.setUp.txt b/tests/ReplayData/Issue2284.setUp.txt deleted file mode 100644 index 8cbd76d166..0000000000 --- a/tests/ReplayData/Issue2284.setUp.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/orgs/pygithubtest -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:55 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/"ad5904f3090e79bbf4b0ab98f052607fa598d96ece53d4ff19b5a40204f57c9a"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:20:20 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4565'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '435'), ('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', 'CBF6:3E975B:11D54BB3:1210F237:65AE97C6')] -{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","url":"https://api.github.com/orgs/pygithubtest","repos_url":"https://api.github.com/orgs/pygithubtest/repos","events_url":"https://api.github.com/orgs/pygithubtest/events","hooks_url":"https://api.github.com/orgs/pygithubtest/hooks","issues_url":"https://api.github.com/orgs/pygithubtest/issues","members_url":"https://api.github.com/orgs/pygithubtest/members{/member}","public_members_url":"https://api.github.com/orgs/pygithubtest/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":0,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/pygithubtest","created_at":"2024-01-18T10:20:20Z","updated_at":"2024-01-18T10:20:20Z","archived_at":null,"type":"Organization","total_private_repos":2,"owned_private_repos":2,"private_gists":0,"disk_usage":0,"collaborators":0,"billing_email":"crowleyt99@gmail.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":false,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":1,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} - -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-1 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:55 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4564'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '436'), ('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', 'CBF7:2C7EC3:1F9D4BBF:1FF67CBB:65AE97C7')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3MIP3VMKE675IYJD63FV2MPG","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} diff --git a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateActionsSecret.txt deleted file mode 100644 index 77f6e30957..0000000000 --- a/tests/ReplayData/Issue2284.testCreateActionsSecret.txt +++ /dev/null @@ -1,20 +0,0 @@ -https -GET -api.github.com -None -/orgs/pygithubtest/actions/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:42 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/"2b8b225f87a91829681446cb1506098cc275881e8ff4bf8b50aa235957de7064"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4594'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '406'), ('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', 'CBBE:2C6D2F:1CA0572A:1CF86233:65AE97BA')] -{"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} - -https -PUT -api.github.com -None -/orgs/pygithubtest/actions/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:42 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4593'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '407'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBBF:3D780F:1DA0F84A:1DF984FB:65AE97BA')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt deleted file mode 100644 index 019a9a0f8f..0000000000 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecret.txt +++ /dev/null @@ -1,20 +0,0 @@ -https -GET -api.github.com -None -/orgs/pygithubtest/dependabot/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:43 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/"e261f6c5e726fa8d18218be1e2526dde7de53adec8a9a0f1f24a740cf14b0bdc"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4590'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '410'), ('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', 'CBC5:90E78:6D82A7F:6F03CFA:65AE97BB')] -{"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} - -https -PUT -api.github.com -None -/orgs/pygithubtest/dependabot/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:44 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4589'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '411'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBC7:28577B:6A73FE:6B5F14:65AE97BC')] diff --git a/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt b/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt deleted file mode 100644 index b4721fcb35..0000000000 --- a/tests/ReplayData/Issue2284.testCreateDependabotSecretSelected.txt +++ /dev/null @@ -1,54 +0,0 @@ -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-1 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:45 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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4586'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '414'), ('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', 'CBCD:1E5887:8A87D7F:8C5D3F8:65AE97BD')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3JKPMOW3KLK7B3H6JTFV2MOS","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} - -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-2 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:45 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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4585'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '415'), ('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', 'CBCF:329237:4013D9B:40DAC23:65AE97BD')] -{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3M5WP755C4PKE3XWPTFV2MOS","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} - -https -GET -api.github.com -None -/orgs/pygithubtest/dependabot/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:46 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/"e261f6c5e726fa8d18218be1e2526dde7de53adec8a9a0f1f24a740cf14b0bdc"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4584'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '416'), ('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', 'CBD3:D37E1:1DA74C2:1DE84DD:65AE97BE')] -{"key_id":"3380217566468950943","key":"wiFZeO47SIh+5vVMztcnw1hCJPd8SCHUffVlKhtLMlk="} - -https -PUT -api.github.com -None -/orgs/pygithubtest/dependabot/secrets/secret_dep_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": ["744944349", "744964532"]} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:46 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4583'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '417'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBD5:354E89:115D2D24:1195C323:65AE97BE')] - - -https -GET -api.github.com -None -/orgs/pygithubtest/actions/secrets/secret_dep_name/repositories -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:47 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/"199092091dbcb6f81920710419f6e08fa7d6bcff69249602b8084d590bedeb82"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4582'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '418'), ('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', 'CBD7:3E975B:11D527D4:1210CE3A:65AE97BE')] -{"total_count":2,"repositories":[{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments"},{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments"}]} diff --git a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt deleted file mode 100644 index 1b2a3c92e6..0000000000 --- a/tests/ReplayData/Issue2284.testCreateRepoActionsSecret.txt +++ /dev/null @@ -1,20 +0,0 @@ -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-1/actions/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:48 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/"71826100a85192e8730122ab1a60efcd7efe0da05ed2620b491eee3aef82a924"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4579'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '421'), ('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', 'CBDD:37F3C9:16FA647:172D9EB:65AE97BF')] -{"key_id":"3380204578043523366","key":"1cPRvymCqCcniLOQhPY0f68sXXLi+lGD3BWewVKITzo="} - -https -PUT -api.github.com -None -/repos/pygithubtest/demo-repo-1/actions/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:48 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4578'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '422'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBDE:2C6D2F:1CA07628:1CF881B8:65AE97C0')] diff --git a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt deleted file mode 100644 index da443d6f59..0000000000 --- a/tests/ReplayData/Issue2284.testCreateRepoDependabotSecret.txt +++ /dev/null @@ -1,20 +0,0 @@ -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-1/dependabot/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:51 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/"92ac05f857abb283e3ce94c54a018dc2e01b9afef4549119d7d15f467152c264"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4575'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '425'), ('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', 'CBE5:2C7EC3:1F9D35F8:1FF666EF:65AE97C2')] -{"key_id":"3380217566468950943","key":"8KBECZq62xav+jd9pW01mgyzQWZrDrnQGwvxVbx1MjU="} - -https -PUT -api.github.com -None -/repos/pygithubtest/demo-repo-1/dependabot/secrets/secret_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:51 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4574'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '426'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBE7:1AC273:1DFB3DA0:1E53C3B3:65AE97C3')] diff --git a/tests/ReplayData/Issue2284.testOrgSecretEdit.txt b/tests/ReplayData/Issue2284.testOrgSecretEdit.txt deleted file mode 100644 index d925983bac..0000000000 --- a/tests/ReplayData/Issue2284.testOrgSecretEdit.txt +++ /dev/null @@ -1,42 +0,0 @@ -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-1 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"84631577f08f9274ab11c762f51ba2f8ad4a67af7c8377a7153945bd032bc10b"'), ('Last-Modified', 'Thu, 18 Jan 2024 10:22:15 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4569'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '431'), ('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', 'CBEF:2C6D2F:1CA08F22:1CF89AB6:65AE97C5')] -{"id":744944349,"node_id":"R_kgDOLGby3Q","name":"demo-repo-1","full_name":"pygithubtest/demo-repo-1","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-1","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-1/deployments","created_at":"2024-01-18T10:22:14Z","updated_at":"2024-01-18T10:22:15Z","pushed_at":"2024-01-18T10:22:15Z","git_url":"git://github.com/pygithubtest/demo-repo-1.git","ssh_url":"git@github.com:pygithubtest/demo-repo-1.git","clone_url":"https://github.com/pygithubtest/demo-repo-1.git","svn_url":"https://github.com/pygithubtest/demo-repo-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3LNRYVZLWSXLTYXEU3FV2MPC","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} - -https -GET -api.github.com -None -/repos/pygithubtest/demo-repo-2 -{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"8751f54683d077fde5d9a231118ebbcfa75f5c3a4ecda25f309144dd56bf9464"'), ('Last-Modified', 'Thu, 18 Jan 2024 11:14:29 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4568'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '432'), ('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', 'CBF1:D37E1:1DA9556:1DEA5C6:65AE97C5')] -{"id":744964532,"node_id":"R_kgDOLGdBtA","name":"demo-repo-2","full_name":"pygithubtest/demo-repo-2","private":true,"owner":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pygithubtest/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/pygithubtest/demo-repo-2","forks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/forks","keys_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/events","assignees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/merges","archive_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/pygithubtest/demo-repo-2/deployments","created_at":"2024-01-18T11:14:29Z","updated_at":"2024-01-18T11:14:29Z","pushed_at":"2024-01-18T11:14:29Z","git_url":"git://github.com/pygithubtest/demo-repo-2.git","ssh_url":"git@github.com:pygithubtest/demo-repo-2.git","clone_url":"https://github.com/pygithubtest/demo-repo-2.git","svn_url":"https://github.com/pygithubtest/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":false,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","permissions":{"admin":true,"maintain":true,"push":true,"triage":true,"pull":true},"temp_clone_token":"ADZQU3L7HZXO42THKTFBKJ3FV2MPC","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","custom_properties":{},"organization":{"login":"pygithubtest","id":157012578,"node_id":"O_kgDOCVvSYg","avatar_url":"https://avatars.githubusercontent.com/u/157012578?v=4","gravatar_id":"","url":"https://api.github.com/users/pygithubtest","html_url":"https://github.com/pygithubtest","followers_url":"https://api.github.com/users/pygithubtest/followers","following_url":"https://api.github.com/users/pygithubtest/following{/other_user}","gists_url":"https://api.github.com/users/pygithubtest/gists{/gist_id}","starred_url":"https://api.github.com/users/pygithubtest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygithubtest/subscriptions","organizations_url":"https://api.github.com/users/pygithubtest/orgs","repos_url":"https://api.github.com/users/pygithubtest/repos","events_url":"https://api.github.com/users/pygithubtest/events{/privacy}","received_events_url":"https://api.github.com/users/pygithubtest/received_events","type":"Organization","site_admin":false},"network_count":0,"subscribers_count":1} - -https -GET -api.github.com -None -/orgs/pygithubtest/actions/secrets/public-key -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28: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/"2b8b225f87a91829681446cb1506098cc275881e8ff4bf8b50aa235957de7064"'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4567'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '433'), ('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', 'CBF2:3E975B:11D54882:1210EF00:65AE97C6')] -{"key_id":"3380204578043523366","key":"omE0l9TQXWY+fTPEERGoSnNkDu8NzGqyKHg4yhJyuGI="} - -https -PUT -api.github.com -None -/orgs/pygithubtest/actions/secrets/secret_act_name -{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": [744944349, 744964532]} -204 -[('Server', 'GitHub.com'), ('Date', 'Mon, 22 Jan 2024 16:28:54 GMT'), ('X-OAuth-Scopes', 'admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-02-21 16:18:19 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4566'), ('X-RateLimit-Reset', '1705943682'), ('X-RateLimit-Used', '434'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'CBF4:1AC273:1DFB4D75:1E53D3A9:65AE97C6')] diff --git a/tests/ReplayData/Organization.testCreateActionsSecret.txt b/tests/ReplayData/Organization.testCreateActionsSecret.txt new file mode 100644 index 0000000000..447a034cb7 --- /dev/null +++ b/tests/ReplayData/Organization.testCreateActionsSecret.txt @@ -0,0 +1,32 @@ +https +GET +api.github.com +None +/orgs/demoorg +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:38:37 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/"fdd3ad04d14a1c6deb0a4a1fbcc104a59889084ffa9e75d80a66f6b7a54ec074"'), ('Last-Modified', 'Wed, 17 Jan 2024 22:24:36 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('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', '1706834317'), ('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', 'EDD0:6F665:EB314B6:ED7870E:65BC2B7D')] +{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/demoorg","repos_url":"https://api.github.com/orgs/demoorg/repos","events_url":"https://api.github.com/orgs/demoorg/events","hooks_url":"https://api.github.com/orgs/demoorg/hooks","issues_url":"https://api.github.com/orgs/demoorg/issues","members_url":"https://api.github.com/orgs/demoorg/members{/member}","public_members_url":"https://api.github.com/orgs/demoorg/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":3,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/demoorg","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T22:24:36Z","archived_at":null,"type":"Organization","total_private_repos":0,"owned_private_repos":0,"private_gists":0,"disk_usage":5,"collaborators":0,"billing_email":"me@example.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":true,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":2,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} + +https +GET +api.github.com +None +/orgs/demoorg/actions/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:38:37 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/"326d11de4f24fa979dbeeaee53a8d66cd9957752fc68342c1f9b9095f9f7c03b"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4997'), ('X-RateLimit-Reset', '1706834317'), ('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', 'EDD1:53734:E02874D:E26F579:65BC2B7D')] +{"key_id":"3380204578043523366","key":"lEcXo0mlVf630hnPSTSCuXmGo2CxuIAKT7RRvZ1QjB4="} + +https +PUT +api.github.com +None +/orgs/demoorg/actions/secrets/secret_name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} +201 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:38:38 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"ef7d1a03b3332b83aecd008a006821ad3613d37a6ec742a794010bc2d93610cf"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4996'), ('X-RateLimit-Reset', '1706834317'), ('X-RateLimit-Used', '4'), ('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'"), ('X-GitHub-Request-Id', 'EDD2:39C98A:1E5CAD8:1EAD780:65BC2B7E')] +{} diff --git a/tests/ReplayData/Organization.testCreateDependabotSecret.txt b/tests/ReplayData/Organization.testCreateDependabotSecret.txt new file mode 100644 index 0000000000..33af3e296e --- /dev/null +++ b/tests/ReplayData/Organization.testCreateDependabotSecret.txt @@ -0,0 +1,32 @@ +https +GET +api.github.com +None +/orgs/demoorg +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:44 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/"fdd3ad04d14a1c6deb0a4a1fbcc104a59889084ffa9e75d80a66f6b7a54ec074"'), ('Last-Modified', 'Wed, 17 Jan 2024 22:24:36 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4931'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '69'), ('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', 'ED05:2C9777:E41C658:E65E1E5:65BC23C8')] +{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/demoorg","repos_url":"https://api.github.com/orgs/demoorg/repos","events_url":"https://api.github.com/orgs/demoorg/events","hooks_url":"https://api.github.com/orgs/demoorg/hooks","issues_url":"https://api.github.com/orgs/demoorg/issues","members_url":"https://api.github.com/orgs/demoorg/members{/member}","public_members_url":"https://api.github.com/orgs/demoorg/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":3,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/demoorg","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T22:24:36Z","archived_at":null,"type":"Organization","total_private_repos":0,"owned_private_repos":0,"private_gists":0,"disk_usage":5,"collaborators":0,"billing_email":"me@example.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":true,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":2,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} + +https +GET +api.github.com +None +/orgs/demoorg/dependabot/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:44 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/"4f57ae8fba32f7b438a3b02f56bb750c7bac58f35ae00ae9e366f5a8974888b9"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4930'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '70'), ('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', 'ED06:18EF96:DEDD9D3:E11F4DA:65BC23C8')] +{"key_id":"3380217566468950943","key":"HYk6AFuoV0iI+t+geHowOxji1OKAGW6GtngRFeETM14="} + +https +PUT +api.github.com +None +/orgs/demoorg/dependabot/secrets/secret_name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "all"} +201 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:45 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"ef7d1a03b3332b83aecd008a006821ad3613d37a6ec742a794010bc2d93610cf"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4929'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '71'), ('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'"), ('X-GitHub-Request-Id', 'ED07:7E6D9:E68F7CC:E8D1392:65BC23C8')] +{} diff --git a/tests/ReplayData/Organization.testCreateDependabotSecretSelected.txt b/tests/ReplayData/Organization.testCreateDependabotSecretSelected.txt new file mode 100644 index 0000000000..36dc4e6a76 --- /dev/null +++ b/tests/ReplayData/Organization.testCreateDependabotSecretSelected.txt @@ -0,0 +1,65 @@ +https +GET +api.github.com +None +/orgs/demoorg +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:45 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/"fdd3ad04d14a1c6deb0a4a1fbcc104a59889084ffa9e75d80a66f6b7a54ec074"'), ('Last-Modified', 'Wed, 17 Jan 2024 22:24:36 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4927'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '73'), ('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', 'ED09:5E18E:E497844:E6D91FF:65BC23C9')] +{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/demoorg","repos_url":"https://api.github.com/orgs/demoorg/repos","events_url":"https://api.github.com/orgs/demoorg/events","hooks_url":"https://api.github.com/orgs/demoorg/hooks","issues_url":"https://api.github.com/orgs/demoorg/issues","members_url":"https://api.github.com/orgs/demoorg/members{/member}","public_members_url":"https://api.github.com/orgs/demoorg/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":3,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/demoorg","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T22:24:36Z","archived_at":null,"type":"Organization","total_private_repos":0,"owned_private_repos":0,"private_gists":0,"disk_usage":5,"collaborators":0,"billing_email":"me@example.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":true,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":2,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:46 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/"7d6947bb6dc9709c7b930fe8f18991f5210224d5319fa50eb248979e9acf0627"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4926'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '74'), ('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', 'ED0A:D6070:7130FF9:7257CAB:65BC23C9')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/demoorg/demo-repo-1.git","ssh_url":"git@github.com:demoorg/demo-repo-1.git","clone_url":"https://github.com/demoorg/demo-repo-1.git","svn_url":"https://github.com/demoorg/demo-repo-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-2 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:46 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/"692b43682cf160985c81fe3af42dc9e2cf18886063e3d33e74568865389a3a33"'), ('Last-Modified', 'Thu, 01 Feb 2024 18:15:57 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4925'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '75'), ('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', 'ED0B:3D0E38:2904481:296D1C5:65BC23CA')] +{"id":751491527,"node_id":"R_kgDOLMrZxw","name":"demo-repo-2","full_name":"demoorg/demo-repo-2","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-2","forks_url":"https://api.github.com/repos/demoorg/demo-repo-2/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-2/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-2/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-2/deployments","created_at":"2024-02-01T18:02:27Z","updated_at":"2024-02-01T18:15:57Z","pushed_at":"2024-02-01T18:02:28Z","git_url":"git://github.com/demoorg/demo-repo-2.git","ssh_url":"git@github.com:demoorg/demo-repo-2.git","clone_url":"https://github.com/demoorg/demo-repo-2.git","svn_url":"https://github.com/demoorg/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/orgs/demoorg/dependabot/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:47 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/"4f57ae8fba32f7b438a3b02f56bb750c7bac58f35ae00ae9e366f5a8974888b9"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4924'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '76'), ('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', 'ED0C:18EF96:DEDE0F4:E11FC25:65BC23CA')] +{"key_id":"3380217566468950943","key":"HYk6AFuoV0iI+t+geHowOxji1OKAGW6GtngRFeETM14="} + +https +PUT +api.github.com +None +/orgs/demoorg/dependabot/secrets/SECRET_DEP_NAME +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": ["744692002", "751491527"]} +204 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:47 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4923'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '77'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ED0D:3B4C54:45EB070:469E8E3:65BC23CB')] + + +https +GET +api.github.com +None +/orgs/demoorg/dependabot/secrets/SECRET_DEP_NAME/repositories +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:05:47 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/"fb1e023094152db42e0a786bd0caca69105ead37efff1ca109beb50b277b6988"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4922'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '78'), ('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', 'ED0E:19A112:DAF348F:DD351D1:65BC23CB')] +{"total_count":2,"repositories":[{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments"},{"id":751491527,"node_id":"R_kgDOLMrZxw","name":"demo-repo-2","full_name":"demoorg/demo-repo-2","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-2","forks_url":"https://api.github.com/repos/demoorg/demo-repo-2/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-2/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-2/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-2/deployments"}]} diff --git a/tests/ReplayData/Organization.testOrgGetSecretAssertion.txt b/tests/ReplayData/Organization.testOrgGetSecretAssertion.txt new file mode 100644 index 0000000000..8f11fa7ea8 --- /dev/null +++ b/tests/ReplayData/Organization.testOrgGetSecretAssertion.txt @@ -0,0 +1,10 @@ +https +GET +api.github.com +None +/orgs/demoorg +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:38:55 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/"fdd3ad04d14a1c6deb0a4a1fbcc104a59889084ffa9e75d80a66f6b7a54ec074"'), ('Last-Modified', 'Wed, 17 Jan 2024 22:24:36 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4994'), ('X-RateLimit-Reset', '1706834317'), ('X-RateLimit-Used', '6'), ('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', 'EDD5:2508B2:9AE6C80:9C7B574:65BC2B8F')] +{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/demoorg","repos_url":"https://api.github.com/orgs/demoorg/repos","events_url":"https://api.github.com/orgs/demoorg/events","hooks_url":"https://api.github.com/orgs/demoorg/hooks","issues_url":"https://api.github.com/orgs/demoorg/issues","members_url":"https://api.github.com/orgs/demoorg/members{/member}","public_members_url":"https://api.github.com/orgs/demoorg/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":3,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/demoorg","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T22:24:36Z","archived_at":null,"type":"Organization","total_private_repos":0,"owned_private_repos":0,"private_gists":0,"disk_usage":5,"collaborators":0,"billing_email":"me@example.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":true,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":2,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} diff --git a/tests/ReplayData/Organization.testOrgSecretEdit.txt b/tests/ReplayData/Organization.testOrgSecretEdit.txt new file mode 100644 index 0000000000..9d02611ce3 --- /dev/null +++ b/tests/ReplayData/Organization.testOrgSecretEdit.txt @@ -0,0 +1,53 @@ +https +GET +api.github.com +None +/orgs/demoorg +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:06:55 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/"fdd3ad04d14a1c6deb0a4a1fbcc104a59889084ffa9e75d80a66f6b7a54ec074"'), ('Last-Modified', 'Wed, 17 Jan 2024 22:24:36 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org, read:org, repo, user, write:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4920'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '80'), ('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', 'ED12:D6070:71412E7:7268274:65BC240F')] +{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","url":"https://api.github.com/orgs/demoorg","repos_url":"https://api.github.com/orgs/demoorg/repos","events_url":"https://api.github.com/orgs/demoorg/events","hooks_url":"https://api.github.com/orgs/demoorg/hooks","issues_url":"https://api.github.com/orgs/demoorg/issues","members_url":"https://api.github.com/orgs/demoorg/members{/member}","public_members_url":"https://api.github.com/orgs/demoorg/public_members{/member}","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","description":null,"is_verified":false,"has_organization_projects":true,"has_repository_projects":true,"public_repos":3,"public_gists":0,"followers":0,"following":0,"html_url":"https://github.com/demoorg","created_at":"2024-01-17T20:14:26Z","updated_at":"2024-01-17T22:24:36Z","archived_at":null,"type":"Organization","total_private_repos":0,"owned_private_repos":0,"private_gists":0,"disk_usage":5,"collaborators":0,"billing_email":"me@example.com","default_repository_permission":"read","members_can_create_repositories":true,"two_factor_requirement_enabled":true,"members_allowed_repository_creation_type":"all","members_can_create_public_repositories":true,"members_can_create_private_repositories":true,"members_can_create_internal_repositories":false,"members_can_create_pages":true,"members_can_fork_private_repositories":false,"web_commit_signoff_required":false,"members_can_create_public_pages":true,"members_can_create_private_pages":true,"plan":{"name":"free","space":976562499,"private_repos":10000,"filled_seats":2,"seats":0},"advanced_security_enabled_for_new_repositories":false,"dependabot_alerts_enabled_for_new_repositories":false,"dependabot_security_updates_enabled_for_new_repositories":false,"dependency_graph_enabled_for_new_repositories":false,"secret_scanning_enabled_for_new_repositories":false,"secret_scanning_push_protection_enabled_for_new_repositories":false,"secret_scanning_push_protection_custom_link_enabled":false,"secret_scanning_push_protection_custom_link":null,"secret_scanning_validity_checks_enabled":false} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:06:56 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/"7d6947bb6dc9709c7b930fe8f18991f5210224d5319fa50eb248979e9acf0627"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4919'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '81'), ('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', 'ED13:18EF96:DEECAAF:E12E89F:65BC2410')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/demoorg/demo-repo-1.git","ssh_url":"git@github.com:demoorg/demo-repo-1.git","clone_url":"https://github.com/demoorg/demo-repo-1.git","svn_url":"https://github.com/demoorg/demo-repo-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-2 +{'Accept': 'application/vnd.github.nebula-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:06:56 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/"692b43682cf160985c81fe3af42dc9e2cf18886063e3d33e74568865389a3a33"'), ('Last-Modified', 'Thu, 01 Feb 2024 18:15:57 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; param=nebula-preview; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4918'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '82'), ('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', 'ED14:157E91:E3590BF:E5965E7:65BC2410')] +{"id":751491527,"node_id":"R_kgDOLMrZxw","name":"demo-repo-2","full_name":"demoorg/demo-repo-2","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-2","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-2","forks_url":"https://api.github.com/repos/demoorg/demo-repo-2/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-2/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-2/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-2/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-2/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-2/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-2/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-2/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-2/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-2/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-2/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-2/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-2/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-2/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-2/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-2/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-2/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-2/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-2/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-2/deployments","created_at":"2024-02-01T18:02:27Z","updated_at":"2024-02-01T18:15:57Z","pushed_at":"2024-02-01T18:02:28Z","git_url":"git://github.com/demoorg/demo-repo-2.git","ssh_url":"git@github.com:demoorg/demo-repo-2.git","clone_url":"https://github.com/demoorg/demo-repo-2.git","svn_url":"https://github.com/demoorg/demo-repo-2","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/orgs/demoorg/actions/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:06:56 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/"326d11de4f24fa979dbeeaee53a8d66cd9957752fc68342c1f9b9095f9f7c03b"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4917'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '83'), ('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', 'ED15:45DB9:DF3E31D:E17BD1A:65BC2410')] +{"key_id":"3380204578043523366","key":"lEcXo0mlVf630hnPSTSCuXmGo2CxuIAKT7RRvZ1QjB4="} + +https +PUT +api.github.com +None +/orgs/demoorg/actions/secrets/secret_act_name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "visibility": "selected", "selected_repository_ids": [744692002, 751491527]} +204 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:06:57 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'admin:org'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4916'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '84'), ('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'"), ('Vary', 'Accept-Encoding, Accept, X-Requested-With'), ('X-GitHub-Request-Id', 'ED16:5E18E:E4A708A:E6E8D40:65BC2411')] diff --git a/tests/ReplayData/Repository.testCreateRepoActionsSecret.txt b/tests/ReplayData/Repository.testCreateRepoActionsSecret.txt new file mode 100644 index 0000000000..de867e2124 --- /dev/null +++ b/tests/ReplayData/Repository.testCreateRepoActionsSecret.txt @@ -0,0 +1,32 @@ +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17: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/"9c4b75dd089a2a530c8efb2f9363e83047d8422cc155692914678bf31dcd2880"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4900'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '100'), ('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', 'ED57:6F665:EA48DC1:EC8CB81:65BC26A2')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/demoorg/demo-repo-1.git","ssh_url":"git@github.com:demoorg/demo-repo-1.git","clone_url":"https://github.com/demoorg/demo-repo-1.git","svn_url":"https://github.com/demoorg/demo-repo-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1/actions/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17: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/"63c55f32262fbaf6c8015e5a31e233a90ba8105255746204ba09c641ed874e7d"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4899'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '101'), ('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', 'ED58:364456:13AEE40:13E87A7:65BC26A2')] +{"key_id":"3380204578043523366","key":"oWxGlztcubVOX/ehKONYj83dSjyS4BZphl6dC6L6W3U="} + +https +PUT +api.github.com +None +/repos/demoorg/demo-repo-1/actions/secrets/secret_name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380204578043523366", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} +201 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17:55 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"ef7d1a03b3332b83aecd008a006821ad3613d37a6ec742a794010bc2d93610cf"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4898'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '102'), ('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'"), ('X-GitHub-Request-Id', 'ED59:157E91:E3DC1C3:E61B2A7:65BC26A3')] +{} diff --git a/tests/ReplayData/Repository.testCreateRepoDependabotSecret.txt b/tests/ReplayData/Repository.testCreateRepoDependabotSecret.txt new file mode 100644 index 0000000000..b617bcbb65 --- /dev/null +++ b/tests/ReplayData/Repository.testCreateRepoDependabotSecret.txt @@ -0,0 +1,32 @@ +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17:32 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/"9c4b75dd089a2a530c8efb2f9363e83047d8422cc155692914678bf31dcd2880"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4905'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '95'), ('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', 'ED51:312C7:E2ACED8:E4EC47F:65BC268B')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/demoorg/demo-repo-1.git","ssh_url":"git@github.com:demoorg/demo-repo-1.git","clone_url":"https://github.com/demoorg/demo-repo-1.git","svn_url":"https://github.com/demoorg/demo-repo-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} + +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1/dependabot/secrets/public-key +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17:32 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/"f426af681aa5a6686aba8e402f462cdfaf20f45bf4386951168a3a7df8c1d8d8"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4904'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '96'), ('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', 'ED52:45DB9:DFC4616:E203AF7:65BC268C')] +{"key_id":"3380217566468950943","key":"zMhrH6T/7s0pnAFGSEVKt8nH5XTuCdTIhNcSBgdeeyQ="} + +https +PUT +api.github.com +None +/repos/demoorg/demo-repo-1/dependabot/secrets/secret_name +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"key_id": "3380217566468950943", "encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"} +201 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:17:32 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"ef7d1a03b3332b83aecd008a006821ad3613d37a6ec742a794010bc2d93610cf"'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4903'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '97'), ('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'"), ('X-GitHub-Request-Id', 'ED53:2EE190:B6710DC:B85CE2C:65BC268C')] +{} diff --git a/tests/ReplayData/Repository.testRepoGetSecretAssertion.txt b/tests/ReplayData/Repository.testRepoGetSecretAssertion.txt new file mode 100644 index 0000000000..7c9d666259 --- /dev/null +++ b/tests/ReplayData/Repository.testRepoGetSecretAssertion.txt @@ -0,0 +1,10 @@ +https +GET +api.github.com +None +/repos/demoorg/demo-repo-1 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Server', 'GitHub.com'), ('Date', 'Thu, 01 Feb 2024 23:18:33 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/"9c4b75dd089a2a530c8efb2f9363e83047d8422cc155692914678bf31dcd2880"'), ('Last-Modified', 'Wed, 17 Jan 2024 20:16:00 GMT'), ('X-OAuth-Scopes', 'admin:org, admin:public_key, repo, user'), ('X-Accepted-OAuth-Scopes', 'repo'), ('github-authentication-token-expiration', '2024-03-02 22:39:38 UTC'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4895'), ('X-RateLimit-Reset', '1706829971'), ('X-RateLimit-Used', '105'), ('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', 'ED5D:D6070:71DB13B:7303E28:65BC26C9')] +{"id":744692002,"node_id":"R_kgDOLGMZIg","name":"demo-repo-1","full_name":"demoorg/demo-repo-1","private":false,"owner":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/demoorg/demo-repo-1","description":null,"fork":false,"url":"https://api.github.com/repos/demoorg/demo-repo-1","forks_url":"https://api.github.com/repos/demoorg/demo-repo-1/forks","keys_url":"https://api.github.com/repos/demoorg/demo-repo-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demoorg/demo-repo-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demoorg/demo-repo-1/teams","hooks_url":"https://api.github.com/repos/demoorg/demo-repo-1/hooks","issue_events_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/events{/number}","events_url":"https://api.github.com/repos/demoorg/demo-repo-1/events","assignees_url":"https://api.github.com/repos/demoorg/demo-repo-1/assignees{/user}","branches_url":"https://api.github.com/repos/demoorg/demo-repo-1/branches{/branch}","tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/tags","blobs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demoorg/demo-repo-1/statuses/{sha}","languages_url":"https://api.github.com/repos/demoorg/demo-repo-1/languages","stargazers_url":"https://api.github.com/repos/demoorg/demo-repo-1/stargazers","contributors_url":"https://api.github.com/repos/demoorg/demo-repo-1/contributors","subscribers_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscribers","subscription_url":"https://api.github.com/repos/demoorg/demo-repo-1/subscription","commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/demoorg/demo-repo-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/demoorg/demo-repo-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/demoorg/demo-repo-1/contents/{+path}","compare_url":"https://api.github.com/repos/demoorg/demo-repo-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demoorg/demo-repo-1/merges","archive_url":"https://api.github.com/repos/demoorg/demo-repo-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demoorg/demo-repo-1/downloads","issues_url":"https://api.github.com/repos/demoorg/demo-repo-1/issues{/number}","pulls_url":"https://api.github.com/repos/demoorg/demo-repo-1/pulls{/number}","milestones_url":"https://api.github.com/repos/demoorg/demo-repo-1/milestones{/number}","notifications_url":"https://api.github.com/repos/demoorg/demo-repo-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demoorg/demo-repo-1/labels{/name}","releases_url":"https://api.github.com/repos/demoorg/demo-repo-1/releases{/id}","deployments_url":"https://api.github.com/repos/demoorg/demo-repo-1/deployments","created_at":"2024-01-17T20:15:59Z","updated_at":"2024-01-17T20:16:00Z","pushed_at":"2024-01-17T20:16:00Z","git_url":"git://github.com/demoorg/demo-repo-1.git","ssh_url":"git@github.com:demoorg/demo-repo-1.git","clone_url":"https://github.com/demoorg/demo-repo-1.git","svn_url":"https://github.com/demoorg/demo-repo-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","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","custom_properties":{},"organization":{"login":"demoorg","id":156956893,"node_id":"O_kgDOCVr43Q","avatar_url":"https://avatars.githubusercontent.com/u/156956893?v=4","gravatar_id":"","url":"https://api.github.com/users/demoorg","html_url":"https://github.com/demoorg","followers_url":"https://api.github.com/users/demoorg/followers","following_url":"https://api.github.com/users/demoorg/following{/other_user}","gists_url":"https://api.github.com/users/demoorg/gists{/gist_id}","starred_url":"https://api.github.com/users/demoorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoorg/subscriptions","organizations_url":"https://api.github.com/users/demoorg/orgs","repos_url":"https://api.github.com/users/demoorg/repos","events_url":"https://api.github.com/users/demoorg/events{/privacy}","received_events_url":"https://api.github.com/users/demoorg/received_events","type":"Organization","site_admin":false},"security_and_analysis":{"secret_scanning":{"status":"disabled"},"secret_scanning_push_protection":{"status":"disabled"},"dependabot_security_updates":{"status":"disabled"},"secret_scanning_validity_checks":{"status":"disabled"}},"network_count":0,"subscribers_count":0} diff --git a/tests/Repository.py b/tests/Repository.py index 520e591f96..1d40a00376 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -1954,6 +1954,29 @@ def testRepoVariables(self): for matched_repo_variable in matched_repo_variables: matched_repo_variable.delete() + @mock.patch("github.PublicKey.encrypt") + def testCreateRepoActionsSecret(self, encrypt): + repo = self.g.get_repo("demoorg/demo-repo-1") + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = repo.create_secret("secret_name", "secret-value", "actions") + self.assertIsNotNone(secret) + + @mock.patch("github.PublicKey.encrypt") + def testCreateRepoDependabotSecret(self, encrypt): + repo = self.g.get_repo("demoorg/demo-repo-1") + # encrypt returns a non-deterministic value, we need to mock it so the replay data matches + encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" + secret = repo.create_secret("secret_name", "secret-value", "dependabot") + self.assertIsNotNone(secret) + + def testRepoGetSecretAssertion(self): + repo = self.g.get_repo("demoorg/demo-repo-1") + try: + repo.get_secret(secret_name="splat", secret_type="supersecret") + except AssertionError: + assert True + class LazyRepository(Framework.TestCase): def setUp(self): From b4b4eaff24a7c38e6764e15a6c8b06802318384d Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:09:06 +0000 Subject: [PATCH 16/22] Apply suggestions from code review Co-authored-by: Enrico Minack --- github/Organization.py | 7 ++++--- github/Repository.py | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 8e42280b7d..4cd9fa3d51 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -584,16 +584,17 @@ def create_secret( """ :param secret_name: string name of the secret :param unencrypted_value: string plain text value of the secret - :visibility: string options all or selected - :selected_repositories: list of repositrories that the secret will be available in + :param visibility: string options all or selected + :param selected_repositories: list of repositrories that the secret will be available in :param secret_type: string options actions or dependabot :calls: `PUT /orgs/{org}/{secret_type}/secrets/{secret_name} `_ """ assert isinstance(secret_name, str), secret_name assert isinstance(unencrypted_value, str), unencrypted_value - assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" assert isinstance(visibility, str), visibility + assert is_optional_list(selected_repositories, github.Repository.Repository), selected_repositories + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" if visibility == "selected": assert isinstance(selected_repositories, list) and all( diff --git a/github/Repository.py b/github/Repository.py index c42b305b5f..8ee60808dd 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1698,6 +1698,7 @@ def create_secret( ) -> github.Secret.Secret: """ :calls: `PUT /repos/{owner}/{repo}/{secret_type}/secrets/{secret_name} `_ + :param secret_type: string options actions or dependabot """ assert isinstance(secret_name, str), secret_name assert isinstance(unencrypted_value, str), unencrypted_value @@ -1729,6 +1730,7 @@ def get_secrets( ) -> PaginatedList[github.Secret.Secret]: """ Gets all repository secrets + :param secret_type: string options actions or dependabot """ assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" @@ -1746,6 +1748,7 @@ def get_secrets( def get_secret(self, secret_name: str, secret_type: str = "actions") -> github.Secret.Secret: """ :calls: 'GET /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ + :param secret_type: string options actions or dependabot """ assert isinstance(secret_name, str), secret_name assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" From fad4a7d9fb9399cd83476f71cc36a5b5e50aca2b Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:13:10 +0000 Subject: [PATCH 17/22] Apply suggestions from code review Co-authored-by: Enrico Minack --- tests/Organization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Organization.py b/tests/Organization.py index 2c61217099..8865d757be 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -572,10 +572,10 @@ def testGetVariables(self): @mock.patch("github.PublicKey.encrypt") def testCreateActionsSecret(self, encrypt): - self.org = self.g.get_organization("demoorg") + org = self.g.get_organization("demoorg") # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret_name", "secret-value", visibility="all") + secret = org.create_secret("secret_name", "secret-value", visibility="all") self.assertIsNotNone(secret) @mock.patch("github.PublicKey.encrypt") From b25a10d6826522248047dc8cf579b95ebb244160 Mon Sep 17 00:00:00 2001 From: Sean Killen Date: Thu, 8 Feb 2024 18:48:57 +0000 Subject: [PATCH 18/22] Review Comments: Removing redundant ReplayData and unneeded self. references in tests --- tests/Organization.py | 20 +++++++++--------- .../Organization.testCreateSecret.txt | 21 ------------------- .../Repository.testCreateSecret.txt | 21 ------------------- 3 files changed, 10 insertions(+), 52 deletions(-) delete mode 100644 tests/ReplayData/Organization.testCreateSecret.txt delete mode 100644 tests/ReplayData/Repository.testCreateSecret.txt diff --git a/tests/Organization.py b/tests/Organization.py index 8865d757be..2255f57d3a 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -580,26 +580,26 @@ def testCreateActionsSecret(self, encrypt): @mock.patch("github.PublicKey.encrypt") def testCreateDependabotSecret(self, encrypt): - self.org = self.g.get_organization("demoorg") + org = self.g.get_organization("demoorg") # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all") + secret = org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all") self.assertIsNotNone(secret) def testOrgGetSecretAssertion(self): - self.org = self.g.get_organization("demoorg") + org = self.g.get_organization("demoorg") try: - self.org.get_secret(secret_name="splat", secret_type="supersecret") + org.get_secret(secret_name="splat", secret_type="supersecret") except AssertionError: assert True @mock.patch("github.PublicKey.encrypt") def testCreateDependabotSecretSelected(self, encrypt): - self.org = self.g.get_organization("demoorg") - repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + org = self.g.get_organization("demoorg") + repos = [org.get_repo("demo-repo-1"), org.get_repo("demo-repo-2")] # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret( + secret = org.create_secret( secret_name="SECRET_DEP_NAME", unencrypted_value="secret-value", visibility="selected", @@ -613,11 +613,11 @@ def testCreateDependabotSecretSelected(self, encrypt): @mock.patch("github.PublicKey.encrypt") def testOrgSecretEdit(self, encrypt): - self.org = self.g.get_organization("demoorg") - repos = [self.org.get_repo("demo-repo-1"), self.org.get_repo("demo-repo-2")] + org = self.g.get_organization("demoorg") + repos = [org.get_repo("demo-repo-1"), org.get_repo("demo-repo-2")] # encrypt returns a non-deterministic value, we need to mock it so the replay data matches encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" - secret = self.org.create_secret( + secret = org.create_secret( secret_name="secret_act_name", unencrypted_value="secret-value", visibility="selected", diff --git a/tests/ReplayData/Organization.testCreateSecret.txt b/tests/ReplayData/Organization.testCreateSecret.txt deleted file mode 100644 index be828cceaf..0000000000 --- a/tests/ReplayData/Organization.testCreateSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/orgs/BeaverSoftware/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/orgs/BeaverSoftware/actions/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743", "visibility": "all"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} diff --git a/tests/ReplayData/Repository.testCreateSecret.txt b/tests/ReplayData/Repository.testCreateSecret.txt deleted file mode 100644 index 91169b37bd..0000000000 --- a/tests/ReplayData/Repository.testCreateSecret.txt +++ /dev/null @@ -1,21 +0,0 @@ -https -GET -api.github.com -None -/repos/jacquev6/PyGithub/actions/secrets/public-key -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} -None -200 -[('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')] -{"key": "u5e1Z25+z8pmgVVt5Pd8k0z/sKpVL1MXYtRAecE4vm8=", "key_id": "568250167242549743"} - -https -PUT -api.github.com -None -/repos/jacquev6/PyGithub/actions/secrets/secret-name -{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} -{"encrypted_value": "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b", "key_id": "568250167242549743"} -201 -[('Date', 'Fri, 17 Apr 2020 00:12:33 GMT'), ('Server', 'GitHub.com'), ('Content-Length', '2'), ('Content-Type', 'application/json; charset=utf-8'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1587085388'), ('X-OAuth-Scopes', 'read:org, repo, user'), ('X-Accepted-OAuth-Scopes', ''), ('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, 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', 'C290:52DA:50234:B404B:5E98F470')] -{} From d829899e8f25e9504d13d512299679282d72df77 Mon Sep 17 00:00:00 2001 From: smkillen Date: Wed, 13 Mar 2024 15:48:17 +0000 Subject: [PATCH 19/22] Review Comments: Changing Testing of secret_type assertion (#4) * Review Comments: Changing Testing of secret_type assertion * update delete secret option --------- Co-authored-by: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> --- github/Organization.py | 1 + github/Repository.py | 6 ++++-- tests/Organization.py | 5 ++--- tests/Repository.py | 5 ++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 4cd9fa3d51..e2d1a5b907 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -658,6 +658,7 @@ def get_secret(self, secret_name: str, secret_type: str = "actions") -> Organiza :rtype: github.OrganizationSecret.OrganizationSecret """ assert isinstance(secret_name, str), secret_name + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" return github.OrganizationSecret.OrganizationSecret( requester=self._requester, headers={}, diff --git a/github/Repository.py b/github/Repository.py index 8ee60808dd..b1e559fd09 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1812,13 +1812,15 @@ def get_variable(self, variable_name: str) -> github.Variable.Variable: completed=False, ) - def delete_secret(self, secret_name: str) -> bool: + def delete_secret(self, secret_name: str, secret_type: str = "actions") -> bool: """ - :calls: `DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ + :calls: `DELETE /repos/{owner}/{repo}/{secret_type}/secrets/{secret_name} `_ :param secret_name: string + :param secret_type: string options actions or dependabot :rtype: bool """ assert isinstance(secret_name, str), secret_name + assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" secret_name = urllib.parse.quote(secret_name) status, headers, data = self._requester.requestJson("DELETE", f"{self.url}/actions/secrets/{secret_name}") return status == 204 diff --git a/tests/Organization.py b/tests/Organization.py index 2255f57d3a..d742c60af5 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -588,10 +588,9 @@ def testCreateDependabotSecret(self, encrypt): def testOrgGetSecretAssertion(self): org = self.g.get_organization("demoorg") - try: + with self.assertRaises(AssertionError) as exc: org.get_secret(secret_name="splat", secret_type="supersecret") - except AssertionError: - assert True + self.assertEqual(str(exc.exception), "secret_type should be actions or dependabot") @mock.patch("github.PublicKey.encrypt") def testCreateDependabotSecretSelected(self, encrypt): diff --git a/tests/Repository.py b/tests/Repository.py index 1d40a00376..ea284ebf07 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -1972,10 +1972,9 @@ def testCreateRepoDependabotSecret(self, encrypt): def testRepoGetSecretAssertion(self): repo = self.g.get_repo("demoorg/demo-repo-1") - try: + with self.assertRaises(AssertionError) as exc: repo.get_secret(secret_name="splat", secret_type="supersecret") - except AssertionError: - assert True + self.assertEqual(str(exc.exception), "secret_type should be actions or dependabot") class LazyRepository(Framework.TestCase): From 106c27e8fae1a1006ad28c561acb7b26498cdd74 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:54:33 +0000 Subject: [PATCH 20/22] run pre-commit --- github/Repository.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index f3c45b94b8..c3f4547dc1 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1734,8 +1734,7 @@ def get_secrets( secret_type: str = "actions", ) -> PaginatedList[github.Secret.Secret]: """ - Gets all repository secrets - :param secret_type: string options actions or dependabot + Gets all repository secrets :param secret_type: string options actions or dependabot. """ assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" From 76a6b0ba3e7797e4d7fdb24200274fef930bee52 Mon Sep 17 00:00:00 2001 From: Thomas Crowley <15927917+thomascrowley@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:00:05 +0000 Subject: [PATCH 21/22] update delete secret option --- github/Repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/Repository.py b/github/Repository.py index c3f4547dc1..1d45c70f7f 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1825,7 +1825,7 @@ def delete_secret(self, secret_name: str, secret_type: str = "actions") -> bool: assert isinstance(secret_name, str), secret_name assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot" secret_name = urllib.parse.quote(secret_name) - status, headers, data = self._requester.requestJson("DELETE", f"{self.url}/actions/secrets/{secret_name}") + status, headers, data = self._requester.requestJson("DELETE", f"{self.url}/{secret_type}/secrets/{secret_name}") return status == 204 def delete_variable(self, variable_name: str) -> bool: From c72f22bd9e82c72360e16d6b81c54c76f5507078 Mon Sep 17 00:00:00 2001 From: Enrico Minack Date: Thu, 21 Mar 2024 11:40:10 +0100 Subject: [PATCH 22/22] Fix error assertion --- tests/Organization.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Organization.py b/tests/Organization.py index d742c60af5..ed64315654 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -624,7 +624,6 @@ def testOrgSecretEdit(self, encrypt): selected_repositories=repos, ) - try: + with self.assertRaises(AssertionError) as exc: secret.edit(value="newvalue", secret_type="supersecret") - except AssertionError: - assert True + self.assertEqual(str(exc.exception), "secret_type should be actions or dependabot")