MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / get_public_key

Method get_public_key

github/Repository.py:3404–3414  ·  view source on GitHub ↗

:calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key `_ :calls: `GET /repos/{owner}/{repo}/dependabot/secrets/public-key `_

(self, secret_type: str = "actions")

Source from the content-addressed store, hash-verified

3402 )
3403
3404 def get_public_key(self, secret_type: str = "actions") -> PublicKey:
3405 """
3406 :calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key <https://docs.github.com/rest/actions/secrets#get-a-repository-public-key>`_
3407 :calls: `GET /repos/{owner}/{repo}/dependabot/secrets/public-key <https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key>`_
3408 :param secret_type: string options actions or dependabot
3409 :rtype: :class:`github.PublicKey.PublicKey`
3410 """
3411 assert secret_type in ["actions", "dependabot"], "secret_type should be actions or dependabot"
3412
3413 headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/{secret_type}/secrets/public-key")
3414 return github.PublicKey.PublicKey(self._requester, headers, data, completed=True)
3415
3416 def get_pull(self, number: int) -> PullRequest:
3417 """

Callers 3

create_secretMethod · 0.95
testAttributesMethod · 0.45

Calls 1

requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected