GitHubRepositoryModel#
- pydantic model safir.github.models.GitHubRepositoryModel#
A Pydantic model for the
repository
field, often found in webhook payloads.https://docs.github.com/en/rest/repos/repos#get-a-repository
- Parameters:
data (
Any
) –
Show JSON schema
{ "title": "GitHubRepositoryModel", "description": "A Pydantic model for the ``repository`` field, often found in webhook\npayloads.\n\nhttps://docs.github.com/en/rest/repos/repos#get-a-repository", "type": "object", "properties": { "name": { "title": "Repository name", "description": "Excludes owner prefix.", "example": "times-square-demo", "type": "string" }, "full_name": { "title": "Full name", "description": "Full name, including owner prefix (e.g. ``lsst-sqre/times-square-demo``).)", "example": "lsst-sqre/times-square-demo", "type": "string" }, "owner": { "title": "Owner", "description": "The repository's owner.", "allOf": [ { "$ref": "#/definitions/GitHubRepoOwnerModel" } ] }, "default_branch": { "title": "Default Branch", "description": "The default branch (e.g. main).", "example": "main", "type": "string" }, "html_url": { "title": "Html Url", "description": "URL of the repository for browsers.", "example": "https://github.com/lsst-sqre/times-square-demo", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "branches_url": { "title": "Branches Url", "description": "URI template for the repo's branches endpoint.", "example": "https://github.com/lsst-sqre/times-square-demo/branches{/branch}", "type": "string" }, "contents_url": { "title": "Contents Url", "description": "URI template for the contents endpoint.", "example": "https://github.com/lsst-sqre/times-square-demo/contents/{+path}", "type": "string" }, "trees_url": { "title": "Trees Url", "description": "URI template for the Git tree API.", "example": "https://github.com/lsst-sqre/times-square-demo/git/trees{/sha}", "type": "string" }, "blobs_url": { "title": "Blobs Url", "description": "URI template for the Git blobs API.", "example": "https://github.com/lsst-sqre/times-square-demo/git/blobs{/sha}", "type": "string" } }, "required": [ "name", "full_name", "owner", "default_branch", "html_url", "branches_url", "contents_url", "trees_url", "blobs_url" ], "definitions": { "GitHubRepoOwnerModel": { "title": "GitHubRepoOwnerModel", "description": "A Pydantic model for the ``owner`` field found in repository objects.\n\nhttps://docs.github.com/en/rest/repos/repos#get-a-repository", "type": "object", "properties": { "login": { "title": "Login name", "description": "Login name of the owner (either a user or an organization).", "example": "lsst-sqre", "type": "string" } }, "required": [ "login" ] } } }
- Fields:
-
field full_name:
str
[Required]# Full name, including owner prefix (e.g.
lsst-sqre/times-square-demo
).)
-
field html_url:
HttpUrl
[Required]# URL of the repository for browsers.
- Constraints:
minLength = 1
maxLength = 2083
format = uri
-
field owner:
GitHubRepoOwnerModel
[Required]# The repository’s owner.