diff --git a/.github/workflows/latest-changes.yml b/.github/workflows/latest-changes.yml index 2336f11..960a17e 100644 --- a/.github/workflows/latest-changes.yml +++ b/.github/workflows/latest-changes.yml @@ -16,7 +16,7 @@ jobs: latest-changes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a31a7f..3657571 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: @@ -33,7 +33,7 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} with: limit-access-to-actor: true - - uses: actions/cache@v4 + - uses: actions/cache@v5 id: cache with: path: ${{ env.pythonLocation }} @@ -47,7 +47,7 @@ jobs: - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}" - name: Store coverage HTML - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: coverage-html path: htmlcov diff --git a/README.md b/README.md index 8d0b758..63332bf 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ on: jobs: latest-changes: runs-on: ubuntu-latest + # Needed for private repos + permissions: + pull-requests: read steps: - uses: actions/checkout@v4 - uses: khulnasoft/latest-changes@0.3.2 @@ -164,6 +167,9 @@ on: jobs: latest-changes: runs-on: ubuntu-latest + # Needed for private repos + permissions: + pull-requests: read steps: - uses: actions/checkout@v2 - uses: khulnasoft/latest-changes@0.3.2 @@ -276,6 +282,9 @@ on: jobs: latest-changes: runs-on: ubuntu-latest + # Needed for private repos + permissions: + pull-requests: read steps: - uses: actions/checkout@v4 with: @@ -304,6 +313,10 @@ So, the commits will still be shown as made by `github-actions`. ### Latest Changes - Latest Changes 🤷 +* ⬆ Bump actions/checkout from 5 to 6. PR [#6](https://github.com/khulnasoft-bot/latest-changes/pull/6) by [@dependabot[bot]](https://github.com/apps/dependabot). +* ⬆ Bump actions/cache from 4 to 5. PR [#7](https://github.com/khulnasoft-bot/latest-changes/pull/7) by [@dependabot[bot]](https://github.com/apps/dependabot). +* ⬆ Bump actions/upload-artifact from 5 to 6. PR [#8](https://github.com/khulnasoft-bot/latest-changes/pull/8) by [@dependabot[bot]](https://github.com/apps/dependabot). +* 📝 Add permissions needed for private repos. PR [#9](https://github.com/khulnasoft-bot/latest-changes/pull/9) by [@khulnasoft-bot](https://github.com/khulnasoft-bot). * 📝 Tweak docs with new label infra. PR [#4](https://github.com/khulnasoft-bot/latest-changes/pull/4) by [@khulnasoft-bot](https://github.com/khulnasoft-bot). * ⬆ Bump actions/checkout from 4 to 5. PR [#3](https://github.com/khulnasoft-bot/latest-changes/pull/3) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump actions/upload-artifact from 4 to 5. PR [#2](https://github.com/khulnasoft-bot/latest-changes/pull/2) by [@dependabot[bot]](https://github.com/apps/dependabot). @@ -313,6 +326,10 @@ So, the commits will still be shown as made by `github-actions`. * ✨ Prevent CI workflows from running on a latest changes commit, add […. PR [#15](https://github.com/khulnasoft/latest-changes/pull/15) by [@khulnasoft-bot](https://github.com/khulnasoft-bot). * ⬆ Bump khulnasoft/issue-manager from 0.5.0 to 0.5.1. PR [#11](https://github.com/khulnasoft/latest-changes/pull/11) by [@dependabot[bot]](https://github.com/apps/dependabot). +#### Features + +* 🔧 Update GitHub Actions bot user configuration. PR [#5](https://github.com/khulnasoft-bot/latest-changes/pull/5) by [@khulnasoft-bot](https://github.com/khulnasoft-bot). + #### Refactors * Revert "♻️ Refector Update main.py". PR [#13](https://github.com/khulnasoft/latest-changes/pull/13) by [@NxPKG](https://github.com/NxPKG). diff --git a/latest_changes/main.py b/latest_changes/main.py index 3500d36..4250a3a 100644 --- a/latest_changes/main.py +++ b/latest_changes/main.py @@ -233,9 +233,9 @@ def main() -> None: sys.exit(1) logging.info("Setting up GitHub Actions git user") - subprocess.run(["git", "config", "user.name", "github-actions"], check=True) + subprocess.run([git_bin, "config", "user.name", "github-actions[bot]"], check=True) subprocess.run( - ["git", "config", "user.email", "github-actions@github.com"], check=True + [git_bin, "config", "user.email", "github-actions[bot]@users.noreply.github.com"], check=True ) number_of_trials = 10 logging.info(f"Number of trials (for race conditions): {number_of_trials}") diff --git a/latest_changes/model.py b/latest_changes/model.py deleted file mode 100644 index dbf3039..0000000 --- a/latest_changes/model.py +++ /dev/null @@ -1,6677 +0,0 @@ -# generated by datamodel-codegen: -# filename: api.github.com.yaml -# timestamp: 2020-10-03T14:32:04+00:00 - -from __future__ import annotations - -from datetime import datetime -from enum import Enum -from typing import Any, Dict, List, Optional, Union - -from pydantic import AnyUrl, BaseModel, EmailStr, Extra, Field, conint, constr - - -class SimpleUser(BaseModel): - login: str = Field(..., example='octocat') - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDQ6VXNlcjE=') - avatar_url: AnyUrl = Field( - ..., example='https://github.com/images/error/octocat_happy.gif' - ) - gravatar_id: str = Field(..., example='') - url: AnyUrl = Field(..., example='https://api.github.com/users/octocat') - html_url: AnyUrl = Field(..., example='https://github.com/octocat') - followers_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/followers' - ) - following_url: str = Field( - ..., example='https://api.github.com/users/octocat/following{/other_user}' - ) - gists_url: str = Field( - ..., example='https://api.github.com/users/octocat/gists{/gist_id}' - ) - starred_url: str = Field( - ..., example='https://api.github.com/users/octocat/starred{/owner}{/repo}' - ) - subscriptions_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/subscriptions' - ) - organizations_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/orgs' - ) - repos_url: AnyUrl = Field(..., example='https://api.github.com/users/octocat/repos') - events_url: str = Field( - ..., example='https://api.github.com/users/octocat/events{/privacy}' - ) - received_events_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/received_events' - ) - type: str = Field(..., example='User') - site_admin: bool - starred_at: Optional[str] = Field(None, example='"2020-07-09T00:17:55Z"') - - -class Owner(SimpleUser): - pass - - -class Permissions(BaseModel): - class Config: - extra = Extra.allow - - issues: Optional[str] = None - checks: Optional[str] = None - metadata: Optional[str] = None - contents: Optional[str] = None - deployments: Optional[str] = None - - -class Integration(BaseModel): - class Config: - extra = Extra.allow - - id: int = Field(..., description='Unique identifier of the GitHub app', example=37) - slug: Optional[str] = Field( - None, description='The slug name of the GitHub app', example='probot-owners' - ) - node_id: str = Field(..., example='MDExOkludGVncmF0aW9uMQ==') - owner: Owner - name: str = Field( - ..., description='The name of the GitHub app', example='Probot Owners' - ) - description: str = Field(..., example='') - external_url: AnyUrl = Field(..., example='https://example.com') - html_url: AnyUrl = Field(..., example='https://github.com/apps/super-ci') - created_at: datetime = Field(..., example='2017-07-08T16:18:44-04:00') - updated_at: datetime = Field(..., example='2017-07-08T16:18:44-04:00') - permissions: Permissions = Field( - ..., - description='The set of permissions for the GitHub app', - example={'issues': 'read', 'deployments': 'write'}, - ) - events: List[str] = Field( - ..., - description='The list of events for the GitHub app', - example=['label', 'deployment'], - ) - installations_count: Optional[int] = Field( - None, - description='The number of installations associated with the GitHub app', - example=5, - ) - client_id: Optional[str] = Field(None, example='"Iv1.25b5d1e65ffc4022"') - client_secret: Optional[str] = Field( - None, example='"1d4b2097ac622ba702d19de498f005747a8b21d3"' - ) - webhook_secret: Optional[str] = Field( - None, example='"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' - ) - pem: Optional[str] = Field( - None, - example='"-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\\n-----END RSA PRIVATE KEY-----\\n"', - ) - - -class BasicError(BaseModel): - message: Optional[str] = None - documentation_url: Optional[str] = None - - -class ValidationErrorSimple(BaseModel): - message: str - documentation_url: str - errors: Optional[List[str]] = None - - -class Enterprise(BaseModel): - description: Optional[str] = Field( - None, description='A short description of the enterprise.' - ) - html_url: AnyUrl = Field( - ..., example='https://github.com/enterprises/octo-business' - ) - website_url: Optional[AnyUrl] = Field( - None, description="The enterprise's website URL." - ) - id: int = Field(..., description='Unique identifier of the enterprise', example=42) - node_id: str = Field(..., example='MDEwOlJlcG9zaXRvcnkxMjk2MjY5') - name: str = Field( - ..., description='The name of the enterprise.', example='Octo Business' - ) - slug: str = Field( - ..., - description='The slug url identifier for the enterprise.', - example='octo-business', - ) - created_at: datetime = Field(..., example='2019-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2019-01-26T19:14:43Z') - avatar_url: AnyUrl - - -class RepositorySelection(Enum): - all = 'all' - selected = 'selected' - - -class Permissions1(BaseModel): - deployments: Optional[str] = None - checks: Optional[str] = None - metadata: Optional[str] = None - contents: Optional[str] = None - pull_requests: Optional[str] = None - statuses: Optional[str] = None - issues: Optional[str] = Field(None, example='"read"') - organization_administration: Optional[str] = Field(None, example='"read"') - - -class SuspendedBy(SimpleUser): - pass - - -class Installation(BaseModel): - id: int = Field(..., description='The ID of the installation.', example=1) - account: Union[SimpleUser, Enterprise] - repository_selection: RepositorySelection = Field( - ..., - description="Describe whether all repositories have been selected or there's a selection involved", - ) - access_tokens_url: AnyUrl = Field( - ..., example='https://api.github.com/installations/1/access_tokens' - ) - repositories_url: AnyUrl = Field( - ..., example='https://api.github.com/installation/repositories' - ) - html_url: AnyUrl = Field( - ..., example='https://github.com/organizations/github/settings/installations/1' - ) - app_id: int = Field(..., example=1) - target_id: int = Field( - ..., - description='The ID of the user or organization this token is being scoped to.', - ) - target_type: str = Field(..., example='Organization') - permissions: Permissions1 = Field( - ..., example={'issues': 'read', 'deployments': 'write'} - ) - events: List[str] - created_at: datetime - updated_at: datetime - single_file_name: str = Field(..., example='config.yaml') - app_slug: str = Field(..., example='github-actions') - suspended_by: Optional[SuspendedBy] = None - suspended_at: Optional[datetime] = None - contact_email: Optional[str] = Field( - None, example='"test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com"' - ) - - -class LicenseSimple(BaseModel): - key: str = Field(..., example='mit') - name: str = Field(..., example='MIT License') - url: AnyUrl = Field(..., example='https://api.github.com/licenses/mit') - spdx_id: str = Field(..., example='MIT') - node_id: str = Field(..., example='MDc6TGljZW5zZW1pdA==') - html_url: Optional[AnyUrl] = None - - -class License(BaseModel): - key: str = Field(..., example='mit') - name: str = Field(..., example='MIT License') - spdx_id: str = Field(..., example='MIT') - url: AnyUrl = Field(..., example='https://api.github.com/licenses/mit') - node_id: str = Field(..., example='MDc6TGljZW5zZW1pdA==') - html_url: Optional[AnyUrl] = Field(None, example='http://choosealicense.com/licenses/mit/') - description: str = Field( - ..., - example='A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.', - ) - implementation: str = Field( - ..., - example='Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.', - ) - permissions: List[str] = Field( - ..., - example=[ - 'commercial-use', - 'modifications', - 'distribution', - 'sublicense', - 'private-use', - ], - ) - conditions: List[str] = Field(..., example=['include-copyright']) - limitations: List[str] = Field(..., example=['no-liability']) - body: str = Field( - ..., - example='\n\nThe MIT License (MIT)\n\nCopyright (c) [year] [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n', - ) - featured: bool = Field(..., example=True) - - -class Permissions2(BaseModel): - admin: bool - pull: bool - triage: Optional[bool] = None - push: bool - maintain: Optional[bool] = None - - -class Owner1(SimpleUser): - pass - - -class Owner2(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[str] = None - gravatar_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - followers_url: Optional[str] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[str] = None - organizations_url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - received_events_url: Optional[str] = None - type: Optional[str] = None - site_admin: Optional[bool] = None - - -class Permissions3(BaseModel): - admin: Optional[bool] = None - push: Optional[bool] = None - pull: Optional[bool] = None - - -class TemplateRepository(BaseModel): - id: Optional[int] = None - node_id: Optional[str] = None - name: Optional[str] = None - full_name: Optional[str] = None - owner: Optional[Owner2] = None - private: Optional[bool] = None - html_url: Optional[str] = None - description: Optional[str] = None - fork: Optional[bool] = None - url: Optional[str] = None - archive_url: Optional[str] = None - assignees_url: Optional[str] = None - blobs_url: Optional[str] = None - branches_url: Optional[str] = None - collaborators_url: Optional[str] = None - comments_url: Optional[str] = None - commits_url: Optional[str] = None - compare_url: Optional[str] = None - contents_url: Optional[str] = None - contributors_url: Optional[str] = None - deployments_url: Optional[str] = None - downloads_url: Optional[str] = None - events_url: Optional[str] = None - forks_url: Optional[str] = None - git_commits_url: Optional[str] = None - git_refs_url: Optional[str] = None - git_tags_url: Optional[str] = None - git_url: Optional[str] = None - issue_comment_url: Optional[str] = None - issue_events_url: Optional[str] = None - issues_url: Optional[str] = None - keys_url: Optional[str] = None - labels_url: Optional[str] = None - languages_url: Optional[str] = None - merges_url: Optional[str] = None - milestones_url: Optional[str] = None - notifications_url: Optional[str] = None - pulls_url: Optional[str] = None - releases_url: Optional[str] = None - ssh_url: Optional[str] = None - stargazers_url: Optional[str] = None - statuses_url: Optional[str] = None - subscribers_url: Optional[str] = None - subscription_url: Optional[str] = None - tags_url: Optional[str] = None - teams_url: Optional[str] = None - trees_url: Optional[str] = None - clone_url: Optional[str] = None - mirror_url: Optional[str] = None - hooks_url: Optional[str] = None - svn_url: Optional[str] = None - homepage: Optional[str] = None - language: Optional[str] = None - forks_count: Optional[int] = None - stargazers_count: Optional[int] = None - watchers_count: Optional[int] = None - size: Optional[int] = None - default_branch: Optional[str] = None - open_issues_count: Optional[int] = None - is_template: Optional[bool] = None - topics: Optional[List[str]] = None - has_issues: Optional[bool] = None - has_projects: Optional[bool] = None - has_wiki: Optional[bool] = None - has_pages: Optional[bool] = None - has_downloads: Optional[bool] = None - archived: Optional[bool] = None - disabled: Optional[bool] = None - visibility: Optional[str] = None - pushed_at: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - permissions: Optional[Permissions3] = None - allow_rebase_merge: Optional[bool] = None - template_repository: Optional[str] = None - temp_clone_token: Optional[str] = None - allow_squash_merge: Optional[bool] = None - delete_branch_on_merge: Optional[bool] = None - allow_merge_commit: Optional[bool] = None - subscribers_count: Optional[int] = None - network_count: Optional[int] = None - - -class Repository(BaseModel): - id: int = Field(..., description='Unique identifier of the repository', example=42) - node_id: str = Field(..., example='MDEwOlJlcG9zaXRvcnkxMjk2MjY5') - name: str = Field( - ..., description='The name of the repository.', example='Team Environment' - ) - full_name: str = Field(..., example='octocat/Hello-World') - license: Optional[LicenseSimple] = None - forks: int - permissions: Optional[Permissions2] = None - owner: Owner1 - private: bool = Field( - ..., description='Whether the repository is private or public.' - ) - html_url: AnyUrl = Field(..., example='https://github.com/octocat/Hello-World') - description: str = Field(..., example='This your first repo!') - fork: bool - url: AnyUrl = Field(..., example='https://api.github.com/repos/octocat/Hello-World') - archive_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}', - ) - assignees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/assignees{/user}' - ) - blobs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}' - ) - branches_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/branches{/branch}' - ) - collaborators_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}', - ) - comments_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/comments{/number}' - ) - commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/commits{/sha}' - ) - compare_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}', - ) - contents_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contents/{+path}' - ) - contributors_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contributors' - ) - deployments_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/deployments' - ) - downloads_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/downloads' - ) - events_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/events' - ) - forks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/forks' - ) - git_commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}' - ) - git_refs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}' - ) - git_tags_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}' - ) - git_url: str = Field(..., example='git:github.com/octocat/Hello-World.git') - issue_comment_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}', - ) - issue_events_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/events{/number}', - ) - issues_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/issues{/number}' - ) - keys_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/keys{/key_id}' - ) - labels_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/labels{/name}' - ) - languages_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/languages' - ) - merges_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/merges' - ) - milestones_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/milestones{/number}', - ) - notifications_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}', - ) - pulls_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/pulls{/number}' - ) - releases_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/releases{/id}' - ) - ssh_url: str = Field(..., example='git@github.com:octocat/Hello-World.git') - stargazers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/stargazers' - ) - statuses_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/statuses/{sha}' - ) - subscribers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscribers' - ) - subscription_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscription' - ) - tags_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/tags' - ) - teams_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/teams' - ) - trees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}' - ) - clone_url: str = Field(..., example='https://github.com/octocat/Hello-World.git') - mirror_url: Optional[AnyUrl] = Field(None, example='git:git.example.com/octocat/Hello-World') - hooks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/hooks' - ) - svn_url: AnyUrl = Field(..., example='https://svn.github.com/octocat/Hello-World') - homepage: Optional[AnyUrl] = Field(None, example='https://github.com') - language: Optional[str] = None - forks_count: int = Field(..., example=9) - stargazers_count: int = Field(..., example=80) - watchers_count: int = Field(..., example=80) - size: int = Field(..., example=108) - default_branch: str = Field( - ..., description='The default branch of the repository.', example='master' - ) - open_issues_count: int = Field(..., example=0) - is_template: Optional[bool] = Field( - False, - description='Whether this repository acts as a template that can be used to generate new repositories.', - example=True, - ) - topics: Optional[List[str]] = None - has_issues: bool = Field( - ..., description='Whether issues are enabled.', example=True - ) - has_projects: bool = Field( - ..., description='Whether projects are enabled.', example=True - ) - has_wiki: bool = Field( - ..., description='Whether the wiki is enabled.', example=True - ) - has_pages: bool - has_downloads: bool = Field( - ..., description='Whether downloads are enabled.', example=True - ) - archived: bool = Field(..., description='Whether the repository is archived.') - disabled: bool = Field( - ..., description='Returns whether or not this repository disabled.' - ) - visibility: Optional[str] = Field( - 'public', description='The repository visibility: public, private, or internal.' - ) - pushed_at: datetime = Field(..., example='2011-01-26T19:06:43Z') - created_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2011-01-26T19:14:43Z') - allow_rebase_merge: Optional[bool] = Field( - True, - description='Whether to allow rebase merges for pull requests.', - example=True, - ) - template_repository: Optional[TemplateRepository] = None - temp_clone_token: Optional[str] = None - allow_squash_merge: Optional[bool] = Field( - True, - description='Whether to allow squash merges for pull requests.', - example=True, - ) - delete_branch_on_merge: Optional[bool] = Field( - False, - description='Whether to delete head branches when pull requests are merged', - example=False, - ) - allow_merge_commit: Optional[bool] = Field( - True, - description='Whether to allow merge commits for pull requests.', - example=True, - ) - subscribers_count: Optional[int] = None - network_count: Optional[int] = None - open_issues: int - watchers: int - master_branch: Optional[str] = None - starred_at: Optional[str] = Field(None, example='"2020-07-09T00:17:42Z"') - - -class Permissions4(BaseModel): - issues: Optional[str] = None - contents: Optional[str] = None - metadata: Optional[str] = Field(None, example='read') - single_file: Optional[str] = Field(None, example='read') - - -class RepositorySelection1(Enum): - all = 'all' - selected = 'selected' - - -class InstallationToken(BaseModel): - token: Optional[str] = None - expires_at: Optional[str] = None - permissions: Optional[Permissions4] = None - repository_selection: Optional[RepositorySelection1] = None - repositories: Optional[List[Repository]] = None - single_file: Optional[str] = Field(None, example='README.md') - - -class ValueItem(BaseModel): - pass - - -class Error(BaseModel): - resource: Optional[str] = None - field: Optional[str] = None - message: Optional[str] = None - code: str - index: Optional[int] = None - value: Optional[Union[ValueItem, ValueItem, List[str]]] = None - - -class ValidationError(BaseModel): - message: str - documentation_url: str - errors: Optional[List[Error]] = None - - -class App(BaseModel): - id: Optional[int] = None - slug: Optional[str] = None - node_id: Optional[str] = None - owner: Optional[Owner9] = None - name: Optional[str] = None - description: Optional[str] = None - external_url: Optional[str] = None - html_url: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - permissions: Optional[Permissions12] = None - events: Optional[List[str]] = None - - -class User(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[str] = None - gravatar_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - followers_url: Optional[str] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[str] = None - organizations_url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - received_events_url: Optional[str] = None - type: Optional[str] = None - site_admin: Optional[bool] = None - - -class ApplicationGrant(BaseModel): - id: int = Field(..., example=1) - url: AnyUrl = Field(..., example='https://api.github.com/applications/grants/1') - app: App - created_at: datetime = Field(..., example='2011-09-06T17:26:27Z') - updated_at: datetime = Field(..., example='2011-09-06T20:39:23Z') - scopes: List[str] = Field(..., example=['public_repo']) - user: Optional[User] = None - - -class RepositorySelection2(Enum): - all = 'all' - selected = 'selected' - - -class ScopedInstallation(BaseModel): - permissions: Dict[str, Any] = Field( - ..., example={'issues': 'read', 'deployments': 'write'} - ) - repository_selection: RepositorySelection2 = Field( - ..., - description="Describe whether all repositories have been selected or there's a selection involved", - ) - single_file_name: str = Field(..., example='config.yaml') - repositories_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/repos' - ) - account: SimpleUser - - -class App1(BaseModel): - client_id: str - name: str - url: AnyUrl - - -class User1(SimpleUser): - pass - - -class Installation1(ScopedInstallation): - pass - - -class Authorization(BaseModel): - id: int = Field(..., example=1) - url: AnyUrl = Field(..., example='https://api.github.com/authorizations/1') - scopes: List[str] = Field( - ..., - description='A list of scopes that this authorization is in.', - example=['public_repo', 'user'], - ) - token: str = Field(..., example='') - token_last_eight: str = Field(..., example='12345678') - hashed_token: str = Field( - ..., example='25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8' - ) - app: App1 - note: str = Field(..., example='optional note') - note_url: AnyUrl = Field(..., example='http://optional/note/url') - updated_at: datetime = Field(..., example='2011-09-06T20:39:23Z') - created_at: datetime = Field(..., example='2011-09-06T17:26:27Z') - fingerprint: str = Field(..., example='jklmnop12345678') - user: Optional[User1] = None - installation: Optional[Installation1] = None - - -class CodeOfConduct(BaseModel): - key: str = Field(..., example='contributor_covenant') - name: str = Field(..., example='Contributor Covenant') - url: AnyUrl = Field( - ..., example='https://api.github.com/codes_of_conduct/contributor_covenant' - ) - body: Optional[str] = Field( - None, - example="# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n", - ) - html_url: AnyUrl - - -class ContentReferenceAttachment(BaseModel): - id: int = Field(..., description='The ID of the attachment', example=21) - title: constr(max_length=1024) = Field( - ..., - description='The title of the attachment', - example='Title of the attachment', - ) - body: constr(max_length=262144) = Field( - ..., description='The body of the attachment', example='Body of the attachment' - ) - node_id: Optional[str] = Field( - None, - description='The node_id of the content attachment', - example='MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=', - ) - - -class RunnerGroupsEnterprise(BaseModel): - id: Optional[float] = None - name: Optional[str] = None - visibility: Optional[str] = None - default: Optional[bool] = None - selected_organizations_url: Optional[str] = None - runners_url: Optional[str] = None - - -class OrganizationSimple(BaseModel): - login: str = Field(..., example='github') - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDEyOk9yZ2FuaXphdGlvbjE=') - url: AnyUrl = Field(..., example='https://api.github.com/orgs/github') - repos_url: AnyUrl = Field(..., example='https://api.github.com/orgs/github/repos') - events_url: AnyUrl = Field(..., example='https://api.github.com/orgs/github/events') - hooks_url: str = Field(..., example='https://api.github.com/orgs/github/hooks') - issues_url: str = Field(..., example='https://api.github.com/orgs/github/issues') - members_url: str = Field( - ..., example='https://api.github.com/orgs/github/members{/member}' - ) - public_members_url: str = Field( - ..., example='https://api.github.com/orgs/github/public_members{/member}' - ) - avatar_url: str = Field( - ..., example='https://github.com/images/error/octocat_happy.gif' - ) - description: str = Field(..., example='A great organization') - - -class Type(Enum): - read_only = 'read-only' - custom = 'custom' - - -class Label(BaseModel): - id: Optional[int] = None - node_id: Optional[str] = None - url: Optional[str] = None - name: Optional[str] = None - color: Optional[str] = None - default: Optional[bool] = None - description: Optional[str] = None - - -class Runner(BaseModel): - id: int = Field(..., description='The id of the runner.', example=5) - name: str = Field(..., description='The name of the runner.', example='iMac') - os: str = Field( - ..., description='The Operating System of the runner.', example='macos' - ) - status: str = Field(..., description='The status of the runner.', example='online') - busy: bool - labels: List[Label] - - -class RunnerApplication(BaseModel): - os: Optional[str] = None - architecture: Optional[str] = None - download_url: Optional[str] = None - filename: Optional[str] = None - - -class RepositorySelection3(Enum): - all = 'all' - selected = 'selected' - - -class AuthenticationToken(BaseModel): - token: str = Field( - ..., - description='The token used for authentication', - example='v1.1f699f1069f60xxx', - ) - expires_at: datetime = Field( - ..., description='The time this token expires', example='2016-07-11T22:14:10Z' - ) - permissions: Optional[Dict[str, Any]] = Field( - None, example={'issues': 'read', 'deployments': 'write'} - ) - repositories: Optional[List[Repository]] = Field( - None, description='The repositories this token has access to' - ) - single_file: Optional[str] = Field(None, example='config.yaml') - repository_selection: Optional[RepositorySelection3] = Field( - None, - description="Describe whether all repositories have been selected or there's a selection involved", - ) - - -class MinutesUsedBreakdown(BaseModel): - UBUNTU: Optional[int] = Field( - None, description='Total minutes used on Ubuntu runner machines.' - ) - MACOS: Optional[int] = Field( - None, description='Total minutes used on macOS runner machines.' - ) - WINDOWS: Optional[int] = Field( - None, description='Total minutes used on Windows runner machines.' - ) - - -class ActionsBillingUsage(BaseModel): - total_minutes_used: Optional[int] = Field( - None, description='The sum of the free and paid GitHub Actions minutes used.' - ) - total_paid_minutes_used: Optional[int] = Field( - None, description='The total paid GitHub Actions minutes used.' - ) - included_minutes: Optional[int] = Field( - None, description='The amount of free GitHub Actions minutes available.' - ) - minutes_used_breakdown: Optional[MinutesUsedBreakdown] = None - - -class PackagesBillingUsage(BaseModel): - total_gigabytes_bandwidth_used: Optional[int] = Field( - None, - description='Sum of the free and paid storage space (GB) for GitHuub Packages.', - ) - total_paid_gigabytes_bandwidth_used: Optional[int] = Field( - None, description='Total paid storage space (GB) for GitHuub Packages.' - ) - included_gigabytes_bandwidth: Optional[int] = Field( - None, description='Free storage space (GB) for GitHub Packages.' - ) - - -class CombinedBillingUsage(BaseModel): - days_left_in_billing_cycle: Optional[int] = Field( - None, description='Numbers of days left in billing cycle.' - ) - estimated_paid_storage_for_month: Optional[int] = Field( - None, description='Estimated storage space (GB) used in billing cycle.' - ) - estimated_storage_for_month: Optional[int] = Field( - None, - description='Estimated sum of free and paid storage space (GB) used in billing cycle.', - ) - - -class Actor(BaseModel): - id: int - login: str - display_login: Optional[str] = None - gravatar_id: str - url: AnyUrl - avatar_url: AnyUrl - - -class State(Enum): - open = 'open' - closed = 'closed' - - -class Creator(SimpleUser): - pass - - -class Milestone(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/milestones/1' - ) - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/milestones/v1.0' - ) - labels_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/milestones/1/labels', - ) - id: int = Field(..., example=1002604) - node_id: str = Field(..., example='MDk6TWlsZXN0b25lMTAwMjYwNA==') - number: int = Field(..., description='The number of the milestone.', example=42) - state: State = Field(..., description='The state of the milestone.', example='open') - title: str = Field(..., description='The title of the milestone.', example='v1.0') - description: str = Field(..., example='Tracking milestone for version 1.0') - creator: Creator - open_issues: int = Field(..., example=4) - closed_issues: int = Field(..., example=8) - created_at: datetime = Field(..., example='2011-04-10T20:09:31Z') - updated_at: datetime = Field(..., example='2014-03-03T18:58:10Z') - closed_at: datetime = Field(..., example='2013-02-12T13:22:01Z') - due_on: datetime = Field(..., example='2012-10-09T23:39:01Z') - - -class User2(SimpleUser): - pass - - -class Assignee(SimpleUser): - pass - - -class Milestone1(Milestone): - pass - - -class PullRequest(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/1347' - ) - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDExOlB1bGxSZXF1ZXN0MQ==') - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347' - ) - diff_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347.diff' - ) - patch_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347.patch' - ) - issue_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/issues/1347' - ) - commits_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits', - ) - review_comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments', - ) - review_comment_url: str = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}', - ) - comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/issues/1347/comments', - ) - statuses_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - number: int = Field( - ..., - description='Number uniquely identifying the pull request within its repository.', - example=42, - ) - state: State3 = Field( - ..., - description='State of this Pull Request. Either `open` or `closed`.', - example='open', - ) - locked: bool = Field(..., example=True) - title: str = Field( - ..., description='The title of the pull request.', example='Amazing new feature' - ) - user: User17 - body: str = Field(..., example='Please pull these awesome changes') - labels: List[Label] - milestone: Optional[Milestone4] = None - active_lock_reason: Optional[str] = Field(None, example='too heated') - created_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - closed_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - merged_at: Optional[datetime] = Field(None, example='2011-01-26T19:01:12Z') - merge_commit_sha: str = Field( - ..., example='e5bd3914e2e596debea16f433f57875b5b90bcd6' - ) - assignee: Optional[Assignee4] = None - assignees: Optional[List[SimpleUser]] = None - requested_reviewers: Optional[List[SimpleUser]] = None - requested_teams: Optional[List[TeamSimple]] = None - head: Optional[Head2] = None - base: Optional[Base2] = None - _links: _Links11 - author_association: str = Field(..., example='OWNER') - draft: Optional[bool] = Field( - None, - description='Indicates whether or not the pull request is a draft.', - example=False, - ) - merged: bool - mergeable: Optional[bool] = Field(None, example=True) - rebaseable: Optional[bool] = Field(None, example=True) - mergeable_state: str = Field(..., example='clean') - merged_by: Optional[MergedBy] = None - comments: int = Field(..., example=10) - review_comments: int = Field(..., example=0) - maintainer_can_modify: bool = Field( - ..., - description='Indicates whether maintainers can modify the pull request.', - example=True, - ) - commits: int = Field(..., example=3) - additions: int = Field(..., example=100) - deletions: int = Field(..., example=3) - changed_files: int = Field(..., example=5) - - -class PerformedViaGithubApp(Integration): - pass - - -class IssueSimple(BaseModel): - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDU6SXNzdWUx') - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/issues/1347' - ) - repository_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World' - ) - labels_url: str = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}', - ) - comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/issues/1347/comments', - ) - events_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/issues/1347/events', - ) - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/issues/1347' - ) - number: int = Field(..., example=1347) - state: str = Field(..., example='open') - title: str = Field(..., example='Found a bug') - body: Optional[str] = Field(None, example="I'm having a problem with this.") - user: User2 - labels: List[Label] - assignee: Assignee - assignees: Optional[List[SimpleUser]] = None - milestone: Milestone1 - locked: bool = Field(..., example=True) - active_lock_reason: Optional[str] = Field(None, example='too heated') - comments: int = Field(..., example=0) - pull_request: Optional[PullRequest] = None - closed_at: datetime - created_at: datetime = Field(..., example='2011-04-22T13:33:48Z') - updated_at: datetime = Field(..., example='2011-04-22T13:33:48Z') - author_association: str - body_html: Optional[str] = None - body_text: Optional[str] = None - timeline_url: Optional[AnyUrl] = None - repository: Optional[Repository] = None - performed_via_github_app: Optional[PerformedViaGithubApp] = None - - -class ReactionRollup(BaseModel): - url: AnyUrl - total_count: int - _1: int = Field(..., alias='+1') - _1: int = Field(..., alias='-1') - laugh: int - confused: int - heart: int - hooray: int - eyes: int - rocket: int - - -class User3(SimpleUser): - pass - - -class PerformedViaGithubApp1(Integration): - pass - - -class IssueComment(BaseModel): - id: int = Field( - ..., description='Unique identifier of the issue comment', example=42 - ) - node_id: str - url: AnyUrl = Field( - ..., - description='URL for the issue comment', - example='https://api.github.com/repositories/42/issues/comments/1', - ) - body: Optional[str] = Field( - None, - description='Contents of the issue comment', - example='What version of Safari were you using when you observed this bug?', - ) - body_text: Optional[str] = None - body_html: Optional[str] = None - html_url: AnyUrl - user: User3 - created_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - updated_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - issue_url: AnyUrl - author_association: str - performed_via_github_app: Optional[PerformedViaGithubApp1] = None - reactions: Optional[ReactionRollup] = None - - -class Repo(BaseModel): - id: int - name: str - url: AnyUrl - - -class Page(BaseModel): - url: AnyUrl = Field( - ..., - description='The API address for accessing this Page resource.', - example='https://api.github.com/repos/github/hello-world/pages', - ) - status: Status5 = Field( - ..., - description='The status of the most recent build of the Page.', - example='built', - ) - cname: str = Field( - ..., description="The Pages site's custom domain", example='example.com' - ) - custom_404: bool = Field( - ..., description='Whether the Page has a custom 404 page.', example=False - ) - html_url: Optional[AnyUrl] = Field( - None, - description='The web address the Page can be accessed from.', - example='https://example.com', - ) - source: Optional[PagesSourceHash] = None - - -class Payload(BaseModel): - action: str - issue: Optional[IssueSimple] = None - comment: Optional[IssueComment] = None - pages: Optional[List[Page]] = None - - -class Event(BaseModel): - id: str - type: str - actor: Actor - repo: Repo - org: Optional[Actor] = None - payload: Payload - public: bool - created_at: datetime - - -class LinkWithType(BaseModel): - href: str - type: str - - -class _Links(BaseModel): - timeline: LinkWithType - user: LinkWithType - security_advisories: Optional[LinkWithType] = None - current_user: Optional[LinkWithType] = None - current_user_public: Optional[LinkWithType] = None - current_user_actor: Optional[LinkWithType] = None - current_user_organization: Optional[LinkWithType] = None - current_user_organizations: Optional[List[LinkWithType]] = None - - -class Feed(BaseModel): - timeline_url: str = Field(..., example='https://github.com/timeline') - user_url: str = Field(..., example='https://github.com/{user}') - current_user_public_url: Optional[str] = Field( - None, example='https://github.com/octocat' - ) - current_user_url: Optional[str] = Field( - None, example='https://github.com/octocat.private?token=abc123' - ) - current_user_actor_url: Optional[str] = Field( - None, example='https://github.com/octocat.private.actor?token=abc123' - ) - current_user_organization_url: Optional[str] = Field(None, example='') - current_user_organization_urls: Optional[List[AnyUrl]] = Field( - None, - example=[ - 'https://github.com/organizations/github/octocat.private.atom?token=abc123' - ], - ) - security_advisories_url: Optional[str] = Field( - None, example='https://github.com/security-advisories' - ) - _links: _Links - - -class Files(BaseModel): - filename: Optional[str] = None - type: Optional[str] = None - language: Optional[str] = None - raw_url: Optional[str] = None - size: Optional[int] = None - truncated: Optional[bool] = None - content: Optional[str] = None - - -class User4(SimpleUser): - pass - - -class Owner3(SimpleUser): - pass - - -class BaseGist(BaseModel): - url: AnyUrl - forks_url: AnyUrl - commits_url: AnyUrl - id: str - node_id: str - git_pull_url: AnyUrl - git_push_url: AnyUrl - html_url: AnyUrl - files: Dict[str, Files] - public: bool - created_at: datetime - updated_at: datetime - description: str - comments: int - user: User4 - comments_url: AnyUrl - owner: Optional[Owner3] = None - truncated: Optional[bool] = None - forks: Optional[List] = None - history: Optional[List] = None - - -class GistSimple(BaseModel): - url: Optional[str] = None - forks_url: Optional[str] = None - commits_url: Optional[str] = None - id: Optional[str] = None - node_id: Optional[str] = None - git_pull_url: Optional[str] = None - git_push_url: Optional[str] = None - html_url: Optional[str] = None - files: Optional[Dict[str, Files]] = None - public: Optional[bool] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - description: Optional[str] = None - comments: Optional[int] = None - user: Optional[str] = None - comments_url: Optional[str] = None - owner: Optional[SimpleUser] = None - truncated: Optional[bool] = None - - -class User5(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[str] = None - gravatar_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - followers_url: Optional[str] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[str] = None - organizations_url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - received_events_url: Optional[str] = None - type: Optional[str] = None - site_admin: Optional[bool] = None - - -class Fork(BaseModel): - user: Optional[User5] = None - url: Optional[str] = None - id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - - -class User6(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[str] = None - gravatar_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - followers_url: Optional[str] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[str] = None - organizations_url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - received_events_url: Optional[str] = None - type: Optional[str] = None - site_admin: Optional[bool] = None - - -class ChangeStatus(BaseModel): - deletions: Optional[int] = None - additions: Optional[int] = None - total: Optional[int] = None - - -class HistoryItem(BaseModel): - url: Optional[str] = None - version: Optional[str] = None - user: Optional[User6] = None - change_status: Optional[ChangeStatus] = None - committed_at: Optional[str] = None - - -class ForkOf(GistSimple): - pass - - -class GistFull(GistSimple): - forks: Optional[List[Fork]] = None - history: Optional[List[HistoryItem]] = None - fork_of: Optional[ForkOf] = None - url: Optional[str] = Field( - None, - example='"https://api.github.com/gists/d8de7663c84491ba9eeb9ca1fd20ced8/cb5b95fe0f15ada6d34a421007ba2e4a34e2771e"', - ) - forks_url: Optional[str] = Field( - None, - example='"https://api.github.com/gists/d8de7663c84491ba9eeb9ca1fd20ced8/forks"', - ) - commits_url: Optional[str] = Field( - None, - example='"https://api.github.com/gists/d8de7663c84491ba9eeb9ca1fd20ced8/commits"', - ) - id: Optional[str] = Field(None, example='"d8de7663c84491ba9eeb9ca1fd20ced8"') - node_id: Optional[str] = Field( - None, example='"MDQ6R2lzdGQ4ZGU3NjYzYzg0NDkxYmE5ZWViOWNhMWZkMjBjZWQ4"' - ) - git_pull_url: Optional[str] = Field( - None, example='"https://gist.github.com/d8de7663c84491ba9eeb9ca1fd20ced8.git"' - ) - git_push_url: Optional[str] = Field( - None, example='"https://gist.github.com/d8de7663c84491ba9eeb9ca1fd20ced8.git"' - ) - html_url: Optional[str] = Field( - None, example='"https://gist.github.com/d8de7663c84491ba9eeb9ca1fd20ced8"' - ) - created_at: Optional[str] = Field(None, example='"2020-07-09T00:18:06Z"') - updated_at: Optional[str] = Field(None, example='"2020-07-09T00:18:06Z"') - description: Optional[str] = Field(None, example='"description"') - comments: Optional[int] = Field(None, example='0') - comments_url: Optional[str] = Field( - None, - example='"https://api.github.com/gists/d8de7663c84491ba9eeb9ca1fd20ced8/comments"', - ) - - -class User7(SimpleUser): - pass - - -class GistComment(BaseModel): - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDExOkdpc3RDb21tZW50MQ==') - url: AnyUrl = Field( - ..., example='https://api.github.com/gists/a6db0bec360bb87e9418/comments/1' - ) - body: constr(max_length=65535) = Field( - ..., description='The comment text.', example='Body of the attachment' - ) - user: User7 - created_at: datetime = Field(..., example='2011-04-18T23:23:56Z') - updated_at: datetime = Field(..., example='2011-04-18T23:23:56Z') - author_association: str - - -class User8(SimpleUser): - pass - - -class ChangeStatus1(BaseModel): - total: Optional[int] = None - additions: Optional[int] = None - deletions: Optional[int] = None - - -class GistCommit(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f', - ) - version: str = Field(..., example='57a7f021a713b1c5a6a199b54cc514735d2d462f') - user: User8 - change_status: ChangeStatus1 - committed_at: datetime = Field(..., example='2010-04-14T02:15:15Z') - - -class GitignoreTemplate(BaseModel): - name: str = Field(..., example='C') - source: str = Field( - ..., - example='# Object files\n*.o\n\n# Libraries\n*.lib\n*.a\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n', - ) - - -class User9(SimpleUser): - pass - - -class Assignee1(SimpleUser): - pass - - -class Milestone2(Milestone): - pass - - -class PullRequest1(BaseModel): - merged_at: Optional[datetime] = None - diff_url: AnyUrl - html_url: AnyUrl - patch_url: AnyUrl - url: AnyUrl - - -class ClosedBy(SimpleUser): - pass - - -class PerformedViaGithubApp2(Integration): - pass - - -class Issue(BaseModel): - id: int - node_id: str - url: AnyUrl = Field( - ..., - description='URL for the issue', - example='https://api.github.com/repositories/42/issues/1', - ) - repository_url: AnyUrl - labels_url: str - comments_url: AnyUrl - events_url: AnyUrl - html_url: AnyUrl - number: int = Field( - ..., - description='Number uniquely identifying the issue within its repository', - example=42, - ) - state: str = Field( - ..., description="State of the issue; either 'open' or 'closed'", example='open' - ) - title: str = Field( - ..., - description='Title of the issue', - example='Widget creation fails in Safari on OS X 10.8', - ) - body: Optional[str] = Field( - None, - description='Contents of the issue', - example='It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug?', - ) - user: User9 - labels: List[Any] = Field( - ..., - description='Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository', - example=['bug', 'registration'], - ) - assignee: Assignee1 - assignees: Optional[List[SimpleUser]] = None - milestone: Milestone2 - locked: bool - active_lock_reason: Optional[str] = None - comments: int - pull_request: Optional[PullRequest1] = None - closed_at: datetime - created_at: datetime - updated_at: datetime - closed_by: Optional[ClosedBy] = None - body_html: Optional[str] = None - body_text: Optional[str] = None - timeline_url: Optional[AnyUrl] = None - repository: Optional[Repository] = None - performed_via_github_app: Optional[PerformedViaGithubApp2] = None - author_association: str - reactions: Optional[ReactionRollup] = None - - -class MarketplaceListingPlan(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/marketplace_listing/plans/1313' - ) - accounts_url: AnyUrl = Field( - ..., example='https://api.github.com/marketplace_listing/plans/1313/accounts' - ) - id: int = Field(..., example=1313) - number: int = Field(..., example=3) - name: str = Field(..., example='Pro') - description: str = Field(..., example='A professional-grade CI solution') - monthly_price_in_cents: int = Field(..., example=1099) - yearly_price_in_cents: int = Field(..., example=11870) - price_model: str = Field(..., example='flat-rate') - has_free_trial: bool = Field(..., example=True) - unit_name: str - state: str = Field(..., example='published') - bullets: List[str] = Field( - ..., example=['Up to 25 private repositories', '11 concurrent builds'] - ) - - -class MarketplacePendingChange(BaseModel): - is_installed: Optional[bool] = None - effective_date: Optional[str] = None - unit_count: Optional[int] = None - id: Optional[int] = None - plan: Optional[MarketplaceListingPlan] = None - - -class MarketplacePurchase1(BaseModel): - billing_cycle: Optional[str] = None - next_billing_date: Optional[str] = None - is_installed: Optional[bool] = None - unit_count: Optional[int] = None - on_free_trial: Optional[bool] = None - free_trial_ends_on: Optional[str] = None - updated_at: Optional[str] = None - plan: Optional[MarketplaceListingPlan] = None - - -class MarketplacePurchase(BaseModel): - url: str - type: str - id: int - login: str - organization_billing_email: Optional[str] = None - marketplace_pending_change: Optional[MarketplacePendingChange] = None - marketplace_purchase: MarketplacePurchase1 - - -class SshKeyFingerprints(BaseModel): - MD5_RSA: Optional[str] = None - MD5_DSA: Optional[str] = None - SHA256_RSA: Optional[str] = None - SHA256_DSA: Optional[str] = None - - -class ApiOverview(BaseModel): - verifiable_password_authentication: bool = Field(..., example=True) - ssh_key_fingerprints: Optional[SshKeyFingerprints] = None - hooks: Optional[List[str]] = Field(None, example=['127.0.0.1/32']) - web: Optional[List[str]] = Field(None, example=['127.0.0.1/32']) - api: Optional[List[str]] = Field(None, example=['127.0.0.1/32']) - git: Optional[List[str]] = Field(None, example=['127.0.0.1/32']) - pages: Optional[List[str]] = Field( - None, example=['192.30.252.153/32', '192.30.252.154/32'] - ) - importer: Optional[List[str]] = Field( - None, example=['54.158.161.132', '54.226.70.38'] - ) - github_services_sha: Optional[str] = Field( - None, example='3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' - ) - installed_version: Optional[str] = None - - -class Owner4(SimpleUser): - pass - - -class Permissions5(BaseModel): - admin: Optional[bool] = None - push: Optional[bool] = None - pull: Optional[bool] = None - - -class License1(BaseModel): - key: Optional[str] = None - name: Optional[str] = None - spdx_id: Optional[str] = None - url: Optional[str] = None - node_id: Optional[str] = None - - -class MinimalRepository(BaseModel): - id: int = Field(..., example=1296269) - node_id: str = Field(..., example='MDEwOlJlcG9zaXRvcnkxMjk2MjY5') - name: str = Field(..., example='Hello-World') - full_name: str = Field(..., example='octocat/Hello-World') - owner: Owner4 - private: bool - html_url: AnyUrl = Field(..., example='https://github.com/octocat/Hello-World') - description: str = Field(..., example='This your first repo!') - fork: bool - url: AnyUrl = Field(..., example='https://api.github.com/repos/octocat/Hello-World') - archive_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}', - ) - assignees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/assignees{/user}' - ) - blobs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}' - ) - branches_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/branches{/branch}' - ) - collaborators_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}', - ) - comments_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/comments{/number}' - ) - commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/commits{/sha}' - ) - compare_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}', - ) - contents_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contents/{+path}' - ) - contributors_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contributors' - ) - deployments_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/deployments' - ) - downloads_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/downloads' - ) - events_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/events' - ) - forks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/forks' - ) - git_commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}' - ) - git_refs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}' - ) - git_tags_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}' - ) - git_url: Optional[str] = None - issue_comment_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}', - ) - issue_events_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/events{/number}', - ) - issues_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/issues{/number}' - ) - keys_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/keys{/key_id}' - ) - labels_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/labels{/name}' - ) - languages_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/languages' - ) - merges_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/merges' - ) - milestones_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/milestones{/number}', - ) - notifications_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}', - ) - pulls_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/pulls{/number}' - ) - releases_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/releases{/id}' - ) - ssh_url: Optional[str] = None - stargazers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/stargazers' - ) - statuses_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/statuses/{sha}' - ) - subscribers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscribers' - ) - subscription_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscription' - ) - tags_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/tags' - ) - teams_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/teams' - ) - trees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}' - ) - clone_url: Optional[str] = None - mirror_url: Optional[str] = None - hooks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/hooks' - ) - svn_url: Optional[str] = None - homepage: Optional[str] = None - language: Optional[str] = None - forks_count: Optional[int] = None - stargazers_count: Optional[int] = None - watchers_count: Optional[int] = None - size: Optional[int] = None - default_branch: Optional[str] = None - open_issues_count: Optional[int] = None - is_template: Optional[bool] = None - topics: Optional[List[str]] = None - has_issues: Optional[bool] = None - has_projects: Optional[bool] = None - has_wiki: Optional[bool] = None - has_pages: Optional[bool] = None - has_downloads: Optional[bool] = None - archived: Optional[bool] = None - disabled: Optional[bool] = None - visibility: Optional[str] = None - pushed_at: Optional[datetime] = Field(None, example='2011-01-26T19:06:43Z') - created_at: Optional[datetime] = Field(None, example='2011-01-26T19:01:12Z') - updated_at: Optional[datetime] = Field(None, example='2011-01-26T19:14:43Z') - permissions: Optional[Permissions5] = None - template_repository: Optional[str] = None - temp_clone_token: Optional[str] = None - delete_branch_on_merge: Optional[bool] = None - subscribers_count: Optional[int] = None - network_count: Optional[int] = None - license: Optional[License1] = None - forks: Optional[int] = Field(None, example=0) - open_issues: Optional[int] = Field(None, example=0) - watchers: Optional[int] = Field(None, example=0) - - -class Subject(BaseModel): - title: Optional[str] = None - url: Optional[str] = None - latest_comment_url: Optional[str] = None - type: Optional[str] = None - - -class Thread(BaseModel): - id: Optional[str] = None - repository: Optional[MinimalRepository] = None - subject: Optional[Subject] = None - reason: Optional[str] = None - unread: Optional[bool] = None - updated_at: Optional[str] = None - last_read_at: Optional[str] = None - url: Optional[str] = None - subscription_url: Optional[str] = Field( - None, example='https://api.github.com/notifications/threads/2/subscription' - ) - - -class ThreadSubscription(BaseModel): - subscribed: bool = Field(..., example=True) - ignored: bool - reason: str - created_at: datetime = Field(..., example='2012-10-06T21:34:12Z') - url: AnyUrl = Field( - ..., example='https://api.github.com/notifications/threads/1/subscription' - ) - thread_url: Optional[AnyUrl] = Field( - None, example='https://api.github.com/notifications/threads/1' - ) - repository_url: Optional[AnyUrl] = Field( - None, example='https://api.github.com/repos/1' - ) - - -class Plan(BaseModel): - name: str - space: int - private_repos: int - filled_seats: Optional[int] = None - seats: Optional[int] = None - - -class OrganizationFull(BaseModel): - login: str = Field(..., example='github') - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDEyOk9yZ2FuaXphdGlvbjE=') - url: AnyUrl = Field(..., example='https://api.github.com/orgs/github') - repos_url: AnyUrl = Field(..., example='https://api.github.com/orgs/github/repos') - events_url: AnyUrl = Field(..., example='https://api.github.com/orgs/github/events') - hooks_url: str = Field(..., example='https://api.github.com/orgs/github/hooks') - issues_url: str = Field(..., example='https://api.github.com/orgs/github/issues') - members_url: str = Field( - ..., example='https://api.github.com/orgs/github/members{/member}' - ) - public_members_url: str = Field( - ..., example='https://api.github.com/orgs/github/public_members{/member}' - ) - avatar_url: str = Field( - ..., example='https://github.com/images/error/octocat_happy.gif' - ) - description: str = Field(..., example='A great organization') - name: Optional[str] = Field(None, example='github') - company: Optional[str] = Field(None, example='GitHub') - blog: Optional[AnyUrl] = Field(None, example='https://github.com/blog') - location: Optional[str] = Field(None, example='San Francisco') - email: Optional[EmailStr] = Field(None, example='octocat@github.com') - twitter_username: Optional[str] = Field(None, example='github') - is_verified: Optional[bool] = Field(None, example=True) - has_organization_projects: bool = Field(..., example=True) - has_repository_projects: bool = Field(..., example=True) - public_repos: int = Field(..., example=2) - public_gists: int = Field(..., example=1) - followers: int = Field(..., example=20) - following: int = Field(..., example=0) - html_url: AnyUrl = Field(..., example='https://github.com/octocat') - created_at: datetime = Field(..., example='2008-01-14T04:33:35Z') - type: str = Field(..., example='Organization') - total_private_repos: Optional[int] = Field(None, example=100) - owned_private_repos: Optional[int] = Field(None, example=100) - private_gists: Optional[int] = Field(None, example=81) - disk_usage: Optional[int] = Field(None, example=10000) - collaborators: Optional[int] = Field(None, example=8) - billing_email: Optional[EmailStr] = Field(None, example='org@example.com') - plan: Optional[Plan] = None - default_repository_permission: Optional[str] = None - members_can_create_repositories: Optional[bool] = Field(None, example=True) - two_factor_requirement_enabled: Optional[bool] = Field(None, example=True) - members_allowed_repository_creation_type: Optional[str] = Field(None, example='all') - members_can_create_public_repositories: Optional[bool] = Field(None, example=True) - members_can_create_private_repositories: Optional[bool] = Field(None, example=True) - members_can_create_internal_repositories: Optional[bool] = Field(None, example=True) - members_can_create_pages: Optional[bool] = Field(None, example=True) - updated_at: datetime - - -class RunnerGroupsOrg(BaseModel): - id: Optional[float] = None - name: Optional[str] = None - visibility: Optional[str] = None - default: Optional[bool] = None - selected_repositories_url: Optional[str] = None - runners_url: Optional[str] = None - inherited: Optional[bool] = None - - -class Visibility(Enum): - all = 'all' - private = 'private' - selected = 'selected' - - -class OrganizationActionsSecret(BaseModel): - name: str = Field( - ..., description='The name of the secret.', example='SECRET_TOKEN' - ) - created_at: datetime - updated_at: datetime - visibility: Visibility = Field(..., description='Visibility of a secret') - selected_repositories_url: Optional[AnyUrl] = Field( - None, - example='https://api.github.com/organizations/org/secrets/my_secret/repositories', - ) - - -class ActionsPublicKey(BaseModel): - key_id: str = Field( - ..., description='The identifier for the key.', example='1234567' - ) - key: str = Field( - ..., - description='The Base64 encoded public key.', - example='hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=', - ) - id: Optional[int] = Field(None, example=2) - url: Optional[str] = Field(None, example='https://api.github.com/user/keys/2') - title: Optional[str] = Field(None, example='ssh-rsa AAAAB3NzaC1yc2EAAA') - created_at: Optional[str] = Field(None, example='2011-01-26T19:01:12Z') - - -class CredentialAuthorization(BaseModel): - login: str = Field( - ..., - description='User login that owns the underlying credential.', - example='monalisa', - ) - credential_id: int = Field( - ..., description='Unique identifier for the credential.', example=1 - ) - credential_type: str = Field( - ..., - description='Human-readable description of the credential type.', - example='SSH Key', - ) - token_last_eight: Optional[str] = Field( - None, - description='Last eight characters of the credential. Only included in responses with credential_type of personal access token.', - example='12345678', - ) - credential_authorized_at: datetime = Field( - ..., - description='Date when the credential was authorized for use.', - example='2011-01-26T19:06:43Z', - ) - scopes: Optional[List[str]] = Field( - None, - description='List of oauth scopes the token has been granted.', - example=['user', 'repo'], - ) - fingerprint: Optional[str] = Field( - None, - description='Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key.', - example='jklmnop12345678', - ) - credential_accessed_at: Optional[datetime] = Field( - None, - description='Date when the credential was last accessed. May be null if it was never accessed', - example='2011-01-26T19:06:43Z', - ) - - -class Config(BaseModel): - url: Optional[str] = Field(None, example='"http://example.com/2"') - insecure_ssl: Optional[str] = Field(None, example='"0"') - content_type: Optional[str] = Field(None, example='"form"') - secret: Optional[str] = Field(None, example='"********"') - - -class OrgHook(BaseModel): - id: int = Field(..., example=1) - url: AnyUrl = Field(..., example='https://api.github.com/orgs/octocat/hooks/1') - ping_url: AnyUrl = Field( - ..., example='https://api.github.com/orgs/octocat/hooks/1/pings' - ) - name: str = Field(..., example='web') - events: List[str] = Field(..., example=['push', 'pull_request']) - active: bool = Field(..., example=True) - config: Config - updated_at: datetime = Field(..., example='2011-09-06T20:39:23Z') - created_at: datetime = Field(..., example='2011-09-06T17:26:27Z') - type: str - - -class Limit(Enum): - existing_users = 'existing_users' - contributors_only = 'contributors_only' - collaborators_only = 'collaborators_only' - - -class InteractionLimit(BaseModel): - limit: Limit = Field( - ..., description='The interaction limit to enable.', example='existing_users' - ) - origin: str = Field(..., example='repository') - expires_at: datetime = Field(..., example='2018-08-17T04:18:39Z') - - -class OrganizationInvitation(BaseModel): - id: Optional[int] = None - login: Optional[str] = None - email: Optional[str] = None - role: Optional[str] = None - created_at: Optional[str] = None - inviter: Optional[SimpleUser] = None - team_count: Optional[int] = None - invitation_team_url: Optional[str] = None - node_id: Optional[str] = Field( - None, example='"MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x"' - ) - invitation_teams_url: Optional[str] = Field( - None, example='"https://api.github.com/organizations/16/invitations/1/teams"' - ) - - -class TeamSimple(BaseModel): - id: int = Field(..., description='Unique identifier of the team', example=1) - node_id: str = Field(..., example='MDQ6VGVhbTE=') - url: AnyUrl = Field( - ..., - description='URL for the team', - example='https://api.github.com/organizations/1/team/1', - ) - members_url: str = Field( - ..., example='https://api.github.com/organizations/1/team/1/members{/member}' - ) - name: str = Field(..., description='Name of the team', example='Justice League') - description: str = Field( - ..., description='Description of the team', example='A great team.' - ) - permission: str = Field( - ..., - description='Permission that the team will have for its repositories', - example='admin', - ) - privacy: Optional[str] = Field( - None, description='The level of privacy this team should have', example='closed' - ) - html_url: AnyUrl = Field(..., example='https://github.com/orgs/rails/teams/core') - repositories_url: AnyUrl = Field( - ..., example='https://api.github.com/organizations/1/team/1/repos' - ) - slug: str = Field(..., example='justice-league') - ldap_dn: Optional[str] = Field( - None, - description='Distinguished Name (DN) that team maps to within LDAP environment', - example='uid=example,ou=users,dc=github,dc=com', - ) - - -class Parent(BaseModel): - url: Optional[str] = None - html_url: Optional[str] = None - sha: Optional[str] = None - - -class Team(BaseModel): - id: Optional[int] = None - node_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - name: Optional[str] = None - slug: Optional[str] = None - description: Optional[str] = None - privacy: Optional[str] = None - permission: Optional[str] = None - members_url: Optional[str] = None - repositories_url: Optional[str] = None - parent: Optional[str] = None - - -class User10(SimpleUser): - pass - - -class Permissions6(BaseModel): - can_create_repository: bool - - -class OrgMembership(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/orgs/octocat/memberships/defunkt' - ) - state: str = Field(..., example='active') - role: str = Field(..., example='admin') - organization_url: AnyUrl = Field(..., example='https://api.github.com/orgs/octocat') - organization: OrganizationSimple - user: User10 - permissions: Optional[Permissions6] = None - - -class Owner5(SimpleUser): - pass - - -class Migration(BaseModel): - id: int = Field(..., example=79) - owner: Owner5 - guid: str = Field(..., example='0b989ba4-242f-11e5-81e1-c7b6966d2516') - state: str = Field(..., example='pending') - lock_repositories: bool = Field(..., example=True) - exclude_attachments: bool - repositories: List[Repository] - url: AnyUrl = Field( - ..., example='https://api.github.com/orgs/octo-org/migrations/79' - ) - created_at: datetime = Field(..., example='2015-07-06T15:33:38-07:00') - updated_at: datetime = Field(..., example='2015-07-06T15:33:38-07:00') - node_id: str - archive_url: Optional[AnyUrl] = None - exclude: Optional[List] = None - - -class Creator1(SimpleUser): - pass - - -class OrganizationPermission(Enum): - read = 'read' - write = 'write' - admin = 'admin' - none = 'none' - - -class Permissions7(BaseModel): - read: bool - write: bool - admin: bool - - -class Project(BaseModel): - owner_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/api-playground/projects-test' - ) - url: AnyUrl = Field(..., example='https://api.github.com/projects/1002604') - html_url: AnyUrl = Field( - ..., example='https://github.com/api-playground/projects-test/projects/12' - ) - columns_url: AnyUrl = Field( - ..., example='https://api.github.com/projects/1002604/columns' - ) - id: int = Field(..., example=1002604) - node_id: str = Field(..., example='MDc6UHJvamVjdDEwMDI2MDQ=') - name: str = Field(..., description='Name of the project', example='Week One Sprint') - body: str = Field( - ..., - description='Body of the project', - example='This project represents the sprint of the first week in January', - ) - number: int = Field(..., example=1) - state: str = Field( - ..., - description="State of the project; either 'open' or 'closed'", - example='open', - ) - creator: Creator1 - created_at: datetime = Field(..., example='2011-04-10T20:09:31Z') - updated_at: datetime = Field(..., example='2014-03-03T18:58:10Z') - organization_permission: Optional[OrganizationPermission] = Field( - None, - description='The baseline permission that all organization members have on this project', - ) - private: Optional[bool] = Field( - None, description='Whether or not this project can be seen by everyone.' - ) - cards_url: Optional[AnyUrl] = None - permissions: Optional[Permissions7] = None - - -class Group(BaseModel): - value: Optional[str] = None - display: Optional[str] = None - - -class GroupMapping(BaseModel): - groups: Optional[List[Group]] = Field( - None, - description='Array of groups to be mapped to this team', - example=[ - { - 'group_id': '111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa', - 'group_name': 'saml-azuread-test', - 'group_description': 'A group of Developers working on AzureAD SAML SSO', - }, - { - 'group_id': '2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2', - 'group_name': 'saml-azuread-test2', - 'group_description': 'Another group of Developers working on AzureAD SAML SSO', - }, - ], - ) - group_id: Optional[str] = Field( - None, - description='The ID of the group', - example='111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa', - ) - group_name: Optional[str] = Field( - None, description='The name of the group', example='saml-azuread-test' - ) - group_description: Optional[str] = Field( - None, - description='a description of the group', - example='A group of Developers working on AzureAD SAML SSO', - ) - status: Optional[str] = Field( - None, - description='synchronization status for this group mapping', - example='unsynced', - ) - synced_at: Optional[str] = Field( - None, - description='the time of the last sync for this group-mapping', - example='2019-06-03 22:27:15:000 -700', - ) - - -class Privacy(Enum): - closed = 'closed' - secret = 'secret' - - -class Parent1(TeamSimple): - pass - - -class TeamFull(BaseModel): - id: int = Field(..., description='Unique identifier of the team', example=42) - node_id: str = Field(..., example='MDQ6VGVhbTE=') - url: AnyUrl = Field( - ..., - description='URL for the team', - example='https://api.github.com/organizations/1/team/1', - ) - html_url: AnyUrl = Field(..., example='https://github.com/orgs/rails/teams/core') - name: str = Field(..., description='Name of the team', example='Developers') - slug: str = Field(..., example='justice-league') - description: str = Field(..., example='A great team.') - privacy: Optional[Privacy] = Field( - None, description='The level of privacy this team should have', example='closed' - ) - permission: str = Field( - ..., - description='Permission that the team will have for its repositories', - example='push', - ) - members_url: str = Field( - ..., example='https://api.github.com/organizations/1/team/1/members{/member}' - ) - repositories_url: AnyUrl = Field( - ..., example='https://api.github.com/organizations/1/team/1/repos' - ) - parent: Optional[Parent1] = None - members_count: int = Field(..., example=3) - repos_count: int = Field(..., example=10) - created_at: datetime = Field(..., example='2017-07-14T16:53:42Z') - updated_at: datetime = Field(..., example='2017-08-17T12:37:15Z') - organization: OrganizationFull - ldap_dn: Optional[str] = Field( - None, - description='Distinguished Name (DN) that team maps to within LDAP environment', - example='uid=example,ou=users,dc=github,dc=com', - ) - - -class Author(SimpleUser): - pass - - -class TeamDiscussion(BaseModel): - author: Author - body: str = Field( - ..., - description='The main text of the discussion.', - example='Please suggest improvements to our workflow in comments.', - ) - body_html: str = Field( - ..., example='

Hi! This is an area for us to collaborate as a team

' - ) - body_version: str = Field( - ..., - description='The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.', - example='0307116bbf7ced493b8d8a346c650b71', - ) - comments_count: int = Field(..., example=0) - comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/organizations/1/team/2343027/discussions/1/comments', - ) - created_at: datetime = Field(..., example='2018-01-25T18:56:31Z') - last_edited_at: datetime - html_url: AnyUrl = Field( - ..., example='https://github.com/orgs/github/teams/justice-league/discussions/1' - ) - node_id: str = Field(..., example='MDE0OlRlYW1EaXNjdXNzaW9uMQ==') - number: int = Field( - ..., description='The unique sequence number of a team discussion.', example=42 - ) - pinned: bool = Field( - ..., - description='Whether or not this discussion should be pinned for easy retrieval.', - example=True, - ) - private: bool = Field( - ..., - description='Whether or not this discussion should be restricted to team members and organization administrators.', - example=True, - ) - team_url: AnyUrl = Field( - ..., example='https://api.github.com/organizations/1/team/2343027' - ) - title: str = Field( - ..., - description='The title of the discussion.', - example='How can we improve our workflow?', - ) - updated_at: datetime = Field(..., example='2018-01-25T18:56:31Z') - url: AnyUrl = Field( - ..., example='https://api.github.com/organizations/1/team/2343027/discussions/1' - ) - reactions: Optional[ReactionRollup] = None - - -class Author1(SimpleUser): - pass - - -class TeamDiscussionComment(BaseModel): - author: Author1 - body: str = Field( - ..., - description='The main text of the comment.', - example='I agree with this suggestion.', - ) - body_html: str = Field(..., example='

Do you like apples?

') - body_version: str = Field( - ..., - description='The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.', - example='0307116bbf7ced493b8d8a346c650b71', - ) - created_at: datetime = Field(..., example='2018-01-15T23:53:58Z') - last_edited_at: datetime - discussion_url: AnyUrl = Field( - ..., example='https://api.github.com/organizations/1/team/2403582/discussions/1' - ) - html_url: AnyUrl = Field( - ..., - example='https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1', - ) - node_id: str = Field(..., example='MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=') - number: int = Field( - ..., - description='The unique sequence number of a team discussion comment.', - example=42, - ) - updated_at: datetime = Field(..., example='2018-01-15T23:53:58Z') - url: AnyUrl = Field( - ..., - example='https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1', - ) - reactions: Optional[ReactionRollup] = None - - -class User11(SimpleUser): - pass - - -class Content(Enum): - _1 = '+1' - __1 = '-1' - laugh = 'laugh' - confused = 'confused' - heart = 'heart' - hooray = 'hooray' - rocket = 'rocket' - eyes = 'eyes' - - -class Reaction(BaseModel): - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDg6UmVhY3Rpb24x') - user: User11 - content: Content = Field(..., description='The reaction to use', example='heart') - created_at: datetime = Field(..., example='2016-05-20T20:09:31Z') - - -class Role(Enum): - member = 'member' - maintainer = 'maintainer' - - -class TeamMembership(BaseModel): - url: AnyUrl - role: Role = Field( - ..., description='The role of the user in the team.', example='member' - ) - state: str - - -class Permissions8(BaseModel): - read: Optional[bool] = None - write: Optional[bool] = None - admin: Optional[bool] = None - - -class TeamProject(BaseModel): - owner_url: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - columns_url: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - name: Optional[str] = None - body: Optional[str] = None - number: Optional[int] = None - state: Optional[str] = None - creator: Optional[SimpleUser] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - organization_permission: Optional[str] = None - private: Optional[bool] = None - permissions: Optional[Permissions8] = None - - -class License2(LicenseSimple): - pass - - -class Permissions9(BaseModel): - admin: bool - pull: bool - triage: Optional[bool] = None - push: bool - maintain: Optional[bool] = None - - -class Owner6(SimpleUser): - pass - - -class Owner7(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[str] = None - gravatar_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - followers_url: Optional[str] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[str] = None - organizations_url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - received_events_url: Optional[str] = None - type: Optional[str] = None - site_admin: Optional[bool] = None - - -class Permissions10(BaseModel): - admin: Optional[bool] = None - push: Optional[bool] = None - pull: Optional[bool] = None - - -class TemplateRepository1(BaseModel): - id: Optional[int] = None - node_id: Optional[str] = None - name: Optional[str] = None - full_name: Optional[str] = None - owner: Optional[Owner7] = None - private: Optional[bool] = None - html_url: Optional[str] = None - description: Optional[str] = None - fork: Optional[bool] = None - url: Optional[str] = None - archive_url: Optional[str] = None - assignees_url: Optional[str] = None - blobs_url: Optional[str] = None - branches_url: Optional[str] = None - collaborators_url: Optional[str] = None - comments_url: Optional[str] = None - commits_url: Optional[str] = None - compare_url: Optional[str] = None - contents_url: Optional[str] = None - contributors_url: Optional[str] = None - deployments_url: Optional[str] = None - downloads_url: Optional[str] = None - events_url: Optional[str] = None - forks_url: Optional[str] = None - git_commits_url: Optional[str] = None - git_refs_url: Optional[str] = None - git_tags_url: Optional[str] = None - git_url: Optional[str] = None - issue_comment_url: Optional[str] = None - issue_events_url: Optional[str] = None - issues_url: Optional[str] = None - keys_url: Optional[str] = None - labels_url: Optional[str] = None - languages_url: Optional[str] = None - merges_url: Optional[str] = None - milestones_url: Optional[str] = None - notifications_url: Optional[str] = None - pulls_url: Optional[str] = None - releases_url: Optional[str] = None - ssh_url: Optional[str] = None - stargazers_url: Optional[str] = None - statuses_url: Optional[str] = None - subscribers_url: Optional[str] = None - subscription_url: Optional[str] = None - tags_url: Optional[str] = None - teams_url: Optional[str] = None - trees_url: Optional[str] = None - clone_url: Optional[str] = None - mirror_url: Optional[str] = None - hooks_url: Optional[str] = None - svn_url: Optional[str] = None - homepage: Optional[str] = None - language: Optional[str] = None - forks_count: Optional[int] = None - stargazers_count: Optional[int] = None - watchers_count: Optional[int] = None - size: Optional[int] = None - default_branch: Optional[str] = None - open_issues_count: Optional[int] = None - is_template: Optional[bool] = None - topics: Optional[List[str]] = None - has_issues: Optional[bool] = None - has_projects: Optional[bool] = None - has_wiki: Optional[bool] = None - has_pages: Optional[bool] = None - has_downloads: Optional[bool] = None - archived: Optional[bool] = None - disabled: Optional[bool] = None - visibility: Optional[str] = None - pushed_at: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - permissions: Optional[Permissions10] = None - allow_rebase_merge: Optional[bool] = None - template_repository: Optional[str] = None - temp_clone_token: Optional[str] = None - allow_squash_merge: Optional[bool] = None - delete_branch_on_merge: Optional[bool] = None - allow_merge_commit: Optional[bool] = None - subscribers_count: Optional[int] = None - network_count: Optional[int] = None - - -class TeamRepository(BaseModel): - id: int = Field(..., description='Unique identifier of the repository', example=42) - node_id: str = Field(..., example='MDEwOlJlcG9zaXRvcnkxMjk2MjY5') - name: str = Field( - ..., description='The name of the repository.', example='Team Environment' - ) - full_name: str = Field(..., example='octocat/Hello-World') - license: License2 - forks: int - permissions: Optional[Permissions9] = None - owner: Owner6 - private: bool = Field( - ..., description='Whether the repository is private or public.' - ) - html_url: AnyUrl = Field(..., example='https://github.com/octocat/Hello-World') - description: str = Field(..., example='This your first repo!') - fork: bool - url: AnyUrl = Field(..., example='https://api.github.com/repos/octocat/Hello-World') - archive_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}', - ) - assignees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/assignees{/user}' - ) - blobs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}' - ) - branches_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/branches{/branch}' - ) - collaborators_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}', - ) - comments_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/comments{/number}' - ) - commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/commits{/sha}' - ) - compare_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}', - ) - contents_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contents/{+path}' - ) - contributors_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contributors' - ) - deployments_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/deployments' - ) - downloads_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/downloads' - ) - events_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/events' - ) - forks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/forks' - ) - git_commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}' - ) - git_refs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}' - ) - git_tags_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}' - ) - git_url: str = Field(..., example='git:github.com/octocat/Hello-World.git') - issue_comment_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}', - ) - issue_events_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/events{/number}', - ) - issues_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/issues{/number}' - ) - keys_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/keys{/key_id}' - ) - labels_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/labels{/name}' - ) - languages_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/languages' - ) - merges_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/merges' - ) - milestones_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/milestones{/number}', - ) - notifications_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}', - ) - pulls_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/pulls{/number}' - ) - releases_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/releases{/id}' - ) - ssh_url: str = Field(..., example='git@github.com:octocat/Hello-World.git') - stargazers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/stargazers' - ) - statuses_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/statuses/{sha}' - ) - subscribers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscribers' - ) - subscription_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscription' - ) - tags_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/tags' - ) - teams_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/teams' - ) - trees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}' - ) - clone_url: str = Field(..., example='https://github.com/octocat/Hello-World.git') - mirror_url: AnyUrl = Field(..., example='git:git.example.com/octocat/Hello-World') - hooks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/hooks' - ) - svn_url: AnyUrl = Field(..., example='https://svn.github.com/octocat/Hello-World') - homepage: AnyUrl = Field(..., example='https://github.com') - language: str - forks_count: int = Field(..., example=9) - stargazers_count: int = Field(..., example=80) - watchers_count: int = Field(..., example=80) - size: int = Field(..., example=108) - default_branch: str = Field( - ..., description='The default branch of the repository.', example='master' - ) - open_issues_count: int = Field(..., example=0) - is_template: Optional[bool] = Field( - False, - description='Whether this repository acts as a template that can be used to generate new repositories.', - example=True, - ) - topics: Optional[List[str]] = None - has_issues: bool = Field( - ..., description='Whether issues are enabled.', example=True - ) - has_projects: bool = Field( - ..., description='Whether projects are enabled.', example=True - ) - has_wiki: bool = Field( - ..., description='Whether the wiki is enabled.', example=True - ) - has_pages: bool - has_downloads: bool = Field( - ..., description='Whether downloads are enabled.', example=True - ) - archived: bool = Field(..., description='Whether the repository is archived.') - disabled: bool = Field( - ..., description='Returns whether or not this repository disabled.' - ) - visibility: Optional[str] = Field( - 'public', description='The repository visibility: public, private, or internal.' - ) - pushed_at: datetime = Field(..., example='2011-01-26T19:06:43Z') - created_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2011-01-26T19:14:43Z') - allow_rebase_merge: Optional[bool] = Field( - True, - description='Whether to allow rebase merges for pull requests.', - example=True, - ) - template_repository: Optional[TemplateRepository1] = None - temp_clone_token: Optional[str] = None - allow_squash_merge: Optional[bool] = Field( - True, - description='Whether to allow squash merges for pull requests.', - example=True, - ) - delete_branch_on_merge: Optional[bool] = Field( - False, - description='Whether to delete head branches when pull requests are merged', - example=False, - ) - allow_merge_commit: Optional[bool] = Field( - True, - description='Whether to allow merge commits for pull requests.', - example=True, - ) - subscribers_count: Optional[int] = None - network_count: Optional[int] = None - open_issues: int - watchers: int - master_branch: Optional[str] = None - - -class Creator2(SimpleUser): - pass - - -class ProjectCard(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/projects/columns/cards/1478' - ) - id: int = Field(..., description="The project card's ID", example=42) - node_id: str = Field(..., example='MDExOlByb2plY3RDYXJkMTQ3OA==') - note: str = Field(..., example='Add payload for delete Project column') - creator: Creator2 - created_at: datetime = Field(..., example='2016-09-05T14:21:06Z') - updated_at: datetime = Field(..., example='2016-09-05T14:20:22Z') - archived: Optional[bool] = Field( - None, description='Whether or not the card is archived', example=False - ) - column_url: AnyUrl = Field( - ..., example='https://api.github.com/projects/columns/367' - ) - content_url: Optional[AnyUrl] = Field( - None, - example='https://api.github.com/repos/api-playground/projects-test/issues/3', - ) - project_url: AnyUrl = Field(..., example='https://api.github.com/projects/120') - - -class ProjectColumn(BaseModel): - url: AnyUrl = Field(..., example='https://api.github.com/projects/columns/367') - project_url: AnyUrl = Field(..., example='https://api.github.com/projects/120') - cards_url: AnyUrl = Field( - ..., example='https://api.github.com/projects/columns/367/cards' - ) - id: int = Field( - ..., description='The unique identifier of the project column', example=42 - ) - node_id: str = Field(..., example='MDEzOlByb2plY3RDb2x1bW4zNjc=') - name: str = Field( - ..., description='Name of the project column', example='Remaining tasks' - ) - created_at: datetime = Field(..., example='2016-09-05T14:18:44Z') - updated_at: datetime = Field(..., example='2016-09-05T14:22:28Z') - - -class User12(SimpleUser): - pass - - -class RepositoryCollaboratorPermission(BaseModel): - permission: str - user: User12 - - -class RateLimit(BaseModel): - limit: int - remaining: int - reset: int - - -class Resources(BaseModel): - core: RateLimit - graphql: Optional[RateLimit] = None - search: RateLimit - source_import: Optional[RateLimit] = None - integration_manifest: Optional[RateLimit] = None - code_scanning_upload: Optional[RateLimit] = None - - -class RateLimitOverview(BaseModel): - resources: Resources - rate: RateLimit - - -class Owner8(SimpleUser): - pass - - -class Permissions11(BaseModel): - admin: bool - pull: bool - push: bool - - -class TemplateRepository2(Repository): - pass - - -class License3(LicenseSimple): - pass - - -class Organization(SimpleUser): - pass - - -class FullRepository(BaseModel): - id: int = Field(..., example=1296269) - node_id: str = Field(..., example='MDEwOlJlcG9zaXRvcnkxMjk2MjY5') - name: str = Field(..., example='Hello-World') - full_name: str = Field(..., example='octocat/Hello-World') - owner: Owner8 - private: bool - html_url: AnyUrl = Field(..., example='https://github.com/octocat/Hello-World') - description: str = Field(..., example='This your first repo!') - fork: bool - url: AnyUrl = Field(..., example='https://api.github.com/repos/octocat/Hello-World') - archive_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}', - ) - assignees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/assignees{/user}' - ) - blobs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}' - ) - branches_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/branches{/branch}' - ) - collaborators_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}', - ) - comments_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/comments{/number}' - ) - commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/commits{/sha}' - ) - compare_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}', - ) - contents_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contents/{+path}' - ) - contributors_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/contributors' - ) - deployments_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/deployments' - ) - downloads_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/downloads' - ) - events_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/events' - ) - forks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/forks' - ) - git_commits_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}' - ) - git_refs_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}' - ) - git_tags_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}' - ) - git_url: str = Field(..., example='git:github.com/octocat/Hello-World.git') - issue_comment_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}', - ) - issue_events_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/issues/events{/number}', - ) - issues_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/issues{/number}' - ) - keys_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/keys{/key_id}' - ) - labels_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/labels{/name}' - ) - languages_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/languages' - ) - merges_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/merges' - ) - milestones_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/milestones{/number}', - ) - notifications_url: str = Field( - ..., - example='http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}', - ) - pulls_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/pulls{/number}' - ) - releases_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/releases{/id}' - ) - ssh_url: str = Field(..., example='git@github.com:octocat/Hello-World.git') - stargazers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/stargazers' - ) - statuses_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/statuses/{sha}' - ) - subscribers_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscribers' - ) - subscription_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/subscription' - ) - tags_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/tags' - ) - teams_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/teams' - ) - trees_url: str = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}' - ) - clone_url: str = Field(..., example='https://github.com/octocat/Hello-World.git') - mirror_url: AnyUrl = Field(..., example='git:git.example.com/octocat/Hello-World') - hooks_url: AnyUrl = Field( - ..., example='http://api.github.com/repos/octocat/Hello-World/hooks' - ) - svn_url: AnyUrl = Field(..., example='https://svn.github.com/octocat/Hello-World') - homepage: AnyUrl = Field(..., example='https://github.com') - language: str - forks_count: int = Field(..., example=9) - stargazers_count: int = Field(..., example=80) - watchers_count: int = Field(..., example=80) - size: int = Field(..., example=108) - default_branch: str = Field(..., example='master') - open_issues_count: int = Field(..., example=0) - is_template: Optional[bool] = Field(None, example=True) - topics: Optional[List[str]] = Field( - None, example=['octocat', 'atom', 'electron', 'API'] - ) - has_issues: bool = Field(..., example=True) - has_projects: bool = Field(..., example=True) - has_wiki: bool = Field(..., example=True) - has_pages: bool - has_downloads: bool = Field(..., example=True) - archived: bool - disabled: bool = Field( - ..., description='Returns whether or not this repository disabled.' - ) - visibility: Optional[str] = Field( - None, - description='The repository visibility: public, private, or internal.', - example='public', - ) - pushed_at: datetime = Field(..., example='2011-01-26T19:06:43Z') - created_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2011-01-26T19:14:43Z') - permissions: Optional[Permissions11] = None - allow_rebase_merge: Optional[bool] = Field(None, example=True) - template_repository: Optional[TemplateRepository2] = None - temp_clone_token: Optional[str] = None - allow_squash_merge: Optional[bool] = Field(None, example=True) - delete_branch_on_merge: Optional[bool] = Field(None, example=False) - allow_merge_commit: Optional[bool] = Field(None, example=True) - subscribers_count: int = Field(..., example=42) - network_count: int = Field(..., example=0) - license: License3 - organization: Optional[Organization] = None - parent: Optional[Repository] = None - source: Optional[Repository] = None - forks: int - master_branch: Optional[str] = None - open_issues: int - watchers: int - anonymous_access_enabled: Optional[bool] = Field( - True, description='Whether anonymous git access is allowed.' - ) - - -class Artifact(BaseModel): - id: int = Field(..., example=5) - node_id: str = Field(..., example='MDEwOkNoZWNrU3VpdGU1') - name: str = Field( - ..., description='The name of the artifact.', example='AdventureWorks.Framework' - ) - size_in_bytes: int = Field( - ..., description='The size in bytes of the artifact.', example=12345 - ) - url: str = Field( - ..., - example='https://api.github.com/repos/github/hello-world/actions/artifacts/5', - ) - archive_download_url: str = Field( - ..., - example='https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip', - ) - expired: bool = Field(..., description='Whether or not the artifact has expired.') - created_at: datetime - expires_at: datetime - updated_at: datetime - - -class Status(BaseModel): - url: Optional[str] = None - avatar_url: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - state: Optional[str] = None - description: Optional[str] = None - target_url: Optional[str] = None - context: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - creator: Optional[SimpleUser] = None - - -class Status1(Enum): - queued = 'queued' - in_progress = 'in_progress' - completed = 'completed' - - -class Step(BaseModel): - status: Status1 = Field( - ..., - description='The phase of the lifecycle that the job is currently in.', - example='queued', - ) - conclusion: str = Field( - ..., description='The outcome of the job.', example='success' - ) - name: str = Field(..., description='The name of the job.', example='test-coverage') - number: int = Field(..., example=1) - started_at: Optional[datetime] = Field( - None, - description='The time that the step started, in ISO 8601 format.', - example='2019-08-08T08:00:00-07:00', - ) - completed_at: Optional[datetime] = Field( - None, - description='The time that the job finished, in ISO 8601 format.', - example='2019-08-08T08:00:00-07:00', - ) - - -class Job(BaseModel): - id: int = Field(..., description='The id of the job.', example=21) - run_id: int = Field( - ..., description='The id of the associated workflow run.', example=5 - ) - run_url: str = Field( - ..., example='https://api.github.com/repos/github/hello-world/actions/runs/5' - ) - node_id: str = Field(..., example='MDg6Q2hlY2tSdW40') - head_sha: str = Field( - ..., - description='The SHA of the commit that is being run.', - example='009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d', - ) - url: str = Field( - ..., example='https://api.github.com/repos/github/hello-world/actions/jobs/21' - ) - html_url: str = Field(..., example='https://github.com/github/hello-world/runs/4') - status: Status = Field( - ..., - description='The phase of the lifecycle that the job is currently in.', - example='queued', - ) - conclusion: str = Field( - ..., description='The outcome of the job.', example='success' - ) - started_at: datetime = Field( - ..., - description='The time that the job started, in ISO 8601 format.', - example='2019-08-08T08:00:00-07:00', - ) - completed_at: datetime = Field( - ..., - description='The time that the job finished, in ISO 8601 format.', - example='2019-08-08T08:00:00-07:00', - ) - name: str = Field(..., description='The name of the job.', example='test-coverage') - steps: Optional[List[Step]] = Field(None, description='Steps in this job.') - check_run_url: str = Field( - ..., example='https://api.github.com/repos/github/hello-world/check-runs/4' - ) - - -class Repo1(BaseModel): - id: int - url: str - name: str - - -class Head(BaseModel): - ref: str - sha: str - repo: Repo1 - - -class Repo2(BaseModel): - id: int - url: str - name: str - - -class Base(BaseModel): - ref: str - sha: str - repo: Repo2 - - -class PullRequestMinimal(BaseModel): - id: int - number: int - url: str - head: Head - base: Base - - -class Author2(BaseModel): - name: str - email: str - - -class Committer(BaseModel): - name: str - email: str - - -class SimpleCommit(BaseModel): - id: str - tree_id: str - message: str - timestamp: datetime - author: Author2 - committer: Committer - - -class WorkflowRun(BaseModel): - id: int = Field(..., description='The ID of the workflow run.', example=5) - node_id: str = Field(..., example='MDEwOkNoZWNrU3VpdGU1') - head_branch: str = Field(..., example='master') - head_sha: str = Field( - ..., - description='The SHA of the head commit that points to the version of the worflow being run.', - example='009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d', - ) - run_number: int = Field( - ..., - description='The auto incrementing run number for the workflow run.', - example=106, - ) - event: str = Field(..., example='push') - status: str = Field(..., example='completed') - conclusion: str = Field(..., example='neutral') - workflow_id: int = Field( - ..., description='The ID of the parent workflow.', example=5 - ) - url: str = Field( - ..., - description='The URL to the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5', - ) - html_url: str = Field(..., example='https://github.com/github/hello-world/suites/4') - pull_requests: List[PullRequestMinimal] - created_at: datetime - updated_at: datetime - jobs_url: str = Field( - ..., - description='The URL to the jobs for the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5/jobs', - ) - logs_url: str = Field( - ..., - description='The URL to download the logs for the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5/logs', - ) - check_suite_url: str = Field( - ..., - description='The URL to the associated check suite.', - example='https://api.github.com/repos/github/hello-world/check-suites/12', - ) - artifacts_url: str = Field( - ..., - description='The URL to the artifacts for the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts', - ) - cancel_url: str = Field( - ..., - description='The URL to cancel the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5/cancel', - ) - rerun_url: str = Field( - ..., - description='The URL to rerun the workflow run.', - example='https://api.github.com/repos/github/hello-world/actions/runs/5/rerun', - ) - workflow_url: str = Field( - ..., - description='The URL to the workflow.', - example='https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml', - ) - head_commit: SimpleCommit - repository: MinimalRepository - head_repository: MinimalRepository - head_repository_id: Optional[int] = Field(None, example=5) - - -class UBUNTU(BaseModel): - total_ms: Optional[int] = None - jobs: Optional[int] = None - - -class MACOS(BaseModel): - total_ms: Optional[int] = None - jobs: Optional[int] = None - - -class WINDOWS(BaseModel): - total_ms: Optional[int] = None - jobs: Optional[int] = None - - -class Billable(BaseModel): - UBUNTU: Optional[UBUNTU] = None - MACOS: Optional[MACOS] = None - WINDOWS: Optional[WINDOWS] = None - - -class WorkflowRunUsage(BaseModel): - billable: Optional[Billable] = None - run_duration_ms: Optional[int] = None - - -class ActionsSecret(BaseModel): - name: str = Field( - ..., description='The name of the secret.', example='SECRET_TOKEN' - ) - created_at: datetime - updated_at: datetime - - -class State1(Enum): - active = 'active' - deleted = 'deleted' - - -class Workflow(BaseModel): - id: int = Field(..., example=5) - node_id: str = Field(..., example='MDg6V29ya2Zsb3cxMg==') - name: str = Field(..., example='CI') - path: str = Field(..., example='ruby.yaml') - state: State1 = Field(..., example='active') - created_at: datetime = Field(..., example='2019-12-06T14:20:20.000Z') - updated_at: datetime = Field(..., example='2019-12-06T14:20:20.000Z') - url: str = Field( - ..., example='https://api.github.com/repos/actions/setup-ruby/workflows/5' - ) - html_url: str = Field( - ..., - example='https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml', - ) - badge_url: str = Field( - ..., example='https://github.com/actions/setup-ruby/workflows/CI/badge.svg' - ) - deleted_at: Optional[datetime] = Field(None, example='2019-12-06T14:20:20.000Z') - - -class UBUNTU1(BaseModel): - total_ms: Optional[int] = None - - -class MACOS1(BaseModel): - total_ms: Optional[int] = None - - -class WINDOWS1(BaseModel): - total_ms: Optional[int] = None - - -class Billable1(BaseModel): - UBUNTU: Optional[UBUNTU1] = None - MACOS: Optional[MACOS1] = None - WINDOWS: Optional[WINDOWS1] = None - - -class WorkflowUsage(BaseModel): - billable: Optional[Billable1] = None - - -class ProtectedBranchAdminEnforced(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins', - ) - enabled: bool = Field(..., example=True) - - -class DismissalRestrictions(BaseModel): - users: Optional[List[SimpleUser]] = Field( - None, description='The list of users with review dismissal access.' - ) - teams: Optional[List[Team]] = Field( - None, description='The list of teams with review dismissal access.' - ) - url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions"', - ) - users_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users"', - ) - teams_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams"', - ) - - -class ProtectedBranchPullRequestReview(BaseModel): - url: Optional[AnyUrl] = Field( - None, - example='https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions', - ) - dismissal_restrictions: Optional[DismissalRestrictions] = None - dismiss_stale_reviews: bool = Field(..., example=True) - require_code_owner_reviews: bool = Field(..., example=True) - required_approving_review_count: Optional[conint(ge=1, le=6)] = Field( - None, example=2 - ) - - -class Owner9(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - url: Optional[str] = None - repos_url: Optional[str] = None - events_url: Optional[str] = None - hooks_url: Optional[str] = None - issues_url: Optional[str] = None - members_url: Optional[str] = None - public_members_url: Optional[str] = None - avatar_url: Optional[str] = None - description: Optional[str] = None - gravatar_id: Optional[str] = Field(None, example='""') - html_url: Optional[str] = Field( - None, example='"https://github.com/testorg-ea8ec76d71c3af4b"' - ) - followers_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers"', - ) - following_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}"', - ) - gists_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}"', - ) - starred_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}"', - ) - subscriptions_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions"', - ) - organizations_url: Optional[str] = Field( - None, example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs"' - ) - received_events_url: Optional[str] = Field( - None, - example='"https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events"', - ) - type: Optional[str] = Field(None, example='"Organization"') - - -class Permissions12(BaseModel): - metadata: Optional[str] = None - contents: Optional[str] = None - issues: Optional[str] = None - single_file: Optional[str] = None - - -class BranchRestrictionPolicy(BaseModel): - url: AnyUrl - users_url: AnyUrl - teams_url: AnyUrl - apps_url: AnyUrl - users: List[User] - teams: List[Team] - apps: List[App] - - -class RequiredStatusChecks(BaseModel): - url: Optional[str] = None - enforcement_level: str - contexts: List[str] - contexts_url: Optional[str] = None - - -class RequiredLinearHistory(BaseModel): - enabled: Optional[bool] = None - - -class AllowForcePushes(BaseModel): - enabled: Optional[bool] = None - - -class AllowDeletions(BaseModel): - enabled: Optional[bool] = None - - -class BranchProtection(BaseModel): - url: Optional[str] = None - required_status_checks: RequiredStatusChecks - enforce_admins: Optional[ProtectedBranchAdminEnforced] = None - required_pull_request_reviews: Optional[ProtectedBranchPullRequestReview] = None - restrictions: Optional[BranchRestrictionPolicy] = None - required_linear_history: Optional[RequiredLinearHistory] = None - allow_force_pushes: Optional[AllowForcePushes] = None - allow_deletions: Optional[AllowDeletions] = None - enabled: bool - name: Optional[str] = Field(None, example='"branch/with/protection"') - protection_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection"', - ) - - -class Commit(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - sha: str = Field(..., example='6dcb09b5b57875f334f61aebed695e2e4193db5e') - node_id: str = Field( - ..., - example='MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==', - ) - html_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments', - ) - commit: Commit1 - author: Author4 - committer: Committer2 - parents: List[Parent] - stats: Optional[Stats] = None - files: Optional[List[File]] = None - - -class ShortBranch(BaseModel): - name: str - commit: Commit - protected: bool - protection: Optional[BranchProtection] = None - protection_url: Optional[AnyUrl] = None - - -class GitUser(BaseModel): - name: Optional[str] = Field(None, example='"Chris Wanstrath"') - email: Optional[str] = Field(None, example='"chris@ozmm.org"') - date: Optional[str] = Field(None, example='"2007-10-29T02:42:39.000-07:00"') - - -class Verification(BaseModel): - verified: bool - reason: str - payload: str - signature: str - - -class Author3(GitUser): - pass - - -class Committer1(GitUser): - pass - - -class Tree(BaseModel): - sha: str = Field(..., example='827efc6d56897b048c772eb4087f854f46256132') - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132', - ) - - -class Commit1(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - author: Author3 - committer: Committer1 - message: str = Field(..., example='Fix all the bugs') - comment_count: int = Field(..., example=0) - tree: Tree - verification: Optional[Verification] = None - - -class Author4(SimpleUser): - pass - - -class Committer2(SimpleUser): - pass - - -class Stats(BaseModel): - additions: Optional[int] = None - deletions: Optional[int] = None - total: Optional[int] = None - - -class File(BaseModel): - filename: Optional[str] = None - additions: Optional[int] = None - deletions: Optional[int] = None - changes: Optional[int] = None - status: Optional[str] = None - raw_url: Optional[str] = None - blob_url: Optional[str] = None - patch: Optional[str] = None - sha: Optional[str] = Field( - None, example='"1e8e60ce9733d5283f7836fa602b6365a66b2567"' - ) - contents_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/owner-3d68404b07d25daeb2d4a6bf/AAA_Public_Repo/contents/geometry.js?ref=c3956841a7cb7e8ba4a6fd923568d86958f01573"', - ) - previous_filename: Optional[str] = Field(None, example='"subdir/before_name.txt"') - - -class _Links1(BaseModel): - html: str - self: AnyUrl - - -class BranchWithProtection(BaseModel): - name: str - commit: Commit - _links: _Links1 - protected: bool - protection: BranchProtection - protection_url: AnyUrl - pattern: Optional[str] = Field(None, example='"mas*"') - required_approving_review_count: Optional[int] = Field(None, example='0') - - -class StatusCheckPolicy(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks', - ) - strict: bool = Field(..., example=True) - contexts: List[str] = Field(..., example=['continuous-integration/travis-ci']) - contexts_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts', - ) - - -class DismissalRestrictions1(BaseModel): - url: AnyUrl - users_url: AnyUrl - teams_url: AnyUrl - users: List[SimpleUser] - teams: List[Team] - - -class RequiredPullRequestReviews(BaseModel): - url: AnyUrl - dismiss_stale_reviews: Optional[bool] = None - require_code_owner_reviews: Optional[bool] = None - required_approving_review_count: Optional[int] = None - dismissal_restrictions: Optional[DismissalRestrictions1] = None - - -class RequiredSignatures(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures', - ) - enabled: bool = Field(..., example=True) - - -class EnforceAdmins(BaseModel): - url: AnyUrl - enabled: bool - - -class RequiredLinearHistory1(BaseModel): - enabled: bool - - -class AllowForcePushes1(BaseModel): - enabled: bool - - -class AllowDeletions1(BaseModel): - enabled: bool - - -class ProtectedBranch(BaseModel): - url: AnyUrl - required_status_checks: Optional[StatusCheckPolicy] = None - required_pull_request_reviews: Optional[RequiredPullRequestReviews] = None - required_signatures: Optional[RequiredSignatures] = None - enforce_admins: Optional[EnforceAdmins] = None - required_linear_history: Optional[RequiredLinearHistory1] = None - allow_force_pushes: Optional[AllowForcePushes1] = None - allow_deletions: Optional[AllowDeletions1] = None - restrictions: Optional[BranchRestrictionPolicy] = None - - -class Status2(Enum): - queued = 'queued' - in_progress = 'in_progress' - completed = 'completed' - - -class Output(BaseModel): - title: str - summary: str - text: str - annotations_count: int - annotations_url: AnyUrl - - -class CheckSuite(BaseModel): - id: int = Field(..., example=5) - node_id: str = Field(..., example='MDEwOkNoZWNrU3VpdGU1') - head_branch: str = Field(..., example='master') - head_sha: str = Field( - ..., - description='The SHA of the head commit that is being checked.', - example='009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d', - ) - status: str = Field(..., example='completed') - conclusion: str = Field(..., example='neutral') - url: str = Field( - ..., example='https://api.github.com/repos/github/hello-world/check-suites/5' - ) - before: str = Field(..., example='146e867f55c26428e5f9fade55a9bbf5e95a7912') - after: str = Field(..., example='d6fde92930d4715a2b49857d24b940956b26d2d3') - pull_requests: List[PullRequestMinimal] - app: App3 - repository: MinimalRepository - created_at: datetime - updated_at: datetime - head_commit: SimpleCommit - latest_check_runs_count: int - check_runs_url: str - - -class App2(Integration): - pass - - -class CheckRun(BaseModel): - id: int = Field(..., description='The id of the check.', example=21) - head_sha: str = Field( - ..., - description='The SHA of the commit that is being checked.', - example='009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d', - ) - node_id: str = Field(..., example='MDg6Q2hlY2tSdW40') - external_id: str = Field(..., example='') - url: str = Field( - ..., example='https://api.github.com/repos/github/hello-world/check-runs/4' - ) - html_url: str = Field(..., example='https://github.com/github/hello-world/runs/4') - details_url: str = Field(..., example='https://example.com') - status: Status2 = Field( - ..., - description='The phase of the lifecycle that the check is currently in.', - example='queued', - ) - conclusion: str = Field(..., example='neutral') - started_at: datetime = Field(..., example='2018-05-04T01:14:52Z') - completed_at: datetime = Field(..., example='2018-05-04T01:14:52Z') - output: Output - name: str = Field( - ..., description='The name of the check.', example='test-coverage' - ) - check_suite: CheckSuite - app: App2 - pull_requests: List[PullRequestMinimal] - - -class CheckAnnotation(BaseModel): - path: str = Field(..., example='README.md') - start_line: int = Field(..., example=2) - end_line: int = Field(..., example=2) - start_column: int = Field(..., example=5) - end_column: int = Field(..., example=10) - annotation_level: str = Field(..., example='warning') - title: str = Field(..., example='Spell Checker') - message: str = Field(..., example="Check your spelling for 'banaas'.") - raw_details: str = Field(..., example="Do you mean 'bananas' or 'banana'?") - blob_href: str - - -class App3(Integration): - pass - - -class AutoTriggerCheck(BaseModel): - app_id: int - setting: bool - - -class Preferences(BaseModel): - auto_trigger_checks: Optional[List[AutoTriggerCheck]] = None - - -class CheckSuitePreference(BaseModel): - preferences: Optional[Preferences] = None - repository: Optional[Repository] = None - - -class CodeScanningAlertState(Enum): - open = 'open' - dismissed = 'dismissed' - fixed = 'fixed' - - -class CodeScanningAlertRef(BaseModel): - __root__: str - - -class CodeScanningAlertNumber(BaseModel): - __root__: int - - -class CodeScanningAlertCreatedAt(BaseModel): - __root__: datetime - - -class CodeScanningAlertUrl(BaseModel): - __root__: AnyUrl - - -class CodeScanningAlertHtmlUrl(BaseModel): - __root__: AnyUrl - - -class CodeScanningAlertDismissedBy(BaseModel): - __root__: Optional[Any] = None - - -class CodeScanningAlertDismissedAt(BaseModel): - __root__: Optional[datetime] = None - - -class CodeScanningAlertDismissedReason(BaseModel): - __root__: Optional[str] = None - - -class Severity(Enum): - none = 'none' - note = 'note' - warning = 'warning' - error = 'error' - - -class CodeScanningAlertRule(BaseModel): - id: Optional[str] = Field( - None, description='A unique identifier for the rule used to detect the alert.' - ) - severity: Optional[Severity] = Field(None, description='The severity of the alert.') - description: Optional[str] = Field( - None, description='A short description of the rule used to detect the alert.' - ) - - -class CodeScanningAnalysisToolName(BaseModel): - __root__: str - - -class CodeScanningAnalysisTool(BaseModel): - name: Optional[CodeScanningAnalysisToolName] = None - version: Optional[str] = Field( - None, description='The version of the tool used to detect the alert.' - ) - - -class CodeScanningAlertCodeScanningAlertItems(BaseModel): - number: Optional[CodeScanningAlertNumber] = None - created_at: Optional[CodeScanningAlertCreatedAt] = None - url: Optional[CodeScanningAlertUrl] = None - html_url: Optional[CodeScanningAlertHtmlUrl] = None - state: Optional[CodeScanningAlertState] = None - dismissed_by: Optional[CodeScanningAlertDismissedBy] = None - dismissed_at: Optional[CodeScanningAlertDismissedAt] = None - dismissed_reason: Optional[CodeScanningAlertDismissedReason] = None - rule: Optional[CodeScanningAlertRule] = None - tool: Optional[CodeScanningAnalysisTool] = None - - -class CodeScanningAnalysisAnalysisKey(BaseModel): - __root__: str - - -class CodeScanningAlertEnvironment(BaseModel): - __root__: str - - -class CodeScanningAlertInstances(BaseModel): - ref: Optional[CodeScanningAlertRef] = None - analysis_key: Optional[CodeScanningAnalysisAnalysisKey] = None - environment: Optional[CodeScanningAlertEnvironment] = None - matrix_vars: Optional[str] = None - state: Optional[CodeScanningAlertState] = None - - -class CodeScanningAlertCodeScanningAlert(BaseModel): - number: Optional[CodeScanningAlertNumber] = None - created_at: Optional[CodeScanningAlertCreatedAt] = None - url: Optional[CodeScanningAlertUrl] = None - html_url: Optional[CodeScanningAlertHtmlUrl] = None - instances: Optional[CodeScanningAlertInstances] = None - state: Optional[CodeScanningAlertState] = None - dismissed_by: Optional[CodeScanningAlertDismissedBy] = None - dismissed_at: Optional[CodeScanningAlertDismissedAt] = None - dismissed_reason: Optional[CodeScanningAlertDismissedReason] = None - rule: Optional[CodeScanningAlertRule] = None - tool: Optional[CodeScanningAnalysisTool] = None - - -class CodeScanningAlertSetState(Enum): - open = 'open' - dismissed = 'dismissed' - - -class CodeScanningAnalysisRef(BaseModel): - __root__: str - - -class CodeScanningAnalysisCommitSha(BaseModel): - __root__: constr(regex='^[0-9a-fA-F]+$', min_length=40, max_length=40) - - -class CodeScanningAnalysisCreatedAt(BaseModel): - __root__: datetime - - -class CodeScanningAnalysisEnvironment(BaseModel): - __root__: str - - -class CodeScanningAnalysisCodeScanningAnalysis(BaseModel): - commit_sha: Optional[CodeScanningAnalysisCommitSha] = None - ref: Optional[CodeScanningAnalysisRef] = None - analysis_key: Optional[CodeScanningAnalysisAnalysisKey] = None - created_at: Optional[CodeScanningAnalysisCreatedAt] = None - tool_name: Optional[CodeScanningAnalysisToolName] = None - error: Optional[str] = Field(None, example='error reading field xyz') - environment: Optional[CodeScanningAnalysisEnvironment] = None - - -class CodeScanningAnalysisSarifFile(BaseModel): - __root__: str - - -class Permissions13(BaseModel): - pull: bool - push: bool - admin: bool - - -class Collaborator(BaseModel): - login: str = Field(..., example='octocat') - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDQ6VXNlcjE=') - avatar_url: AnyUrl = Field( - ..., example='https://github.com/images/error/octocat_happy.gif' - ) - gravatar_id: str = Field(..., example='') - url: AnyUrl = Field(..., example='https://api.github.com/users/octocat') - html_url: AnyUrl = Field(..., example='https://github.com/octocat') - followers_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/followers' - ) - following_url: str = Field( - ..., example='https://api.github.com/users/octocat/following{/other_user}' - ) - gists_url: str = Field( - ..., example='https://api.github.com/users/octocat/gists{/gist_id}' - ) - starred_url: str = Field( - ..., example='https://api.github.com/users/octocat/starred{/owner}{/repo}' - ) - subscriptions_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/subscriptions' - ) - organizations_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/orgs' - ) - repos_url: AnyUrl = Field(..., example='https://api.github.com/users/octocat/repos') - events_url: str = Field( - ..., example='https://api.github.com/users/octocat/events{/privacy}' - ) - received_events_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/received_events' - ) - type: str = Field(..., example='User') - site_admin: bool - permissions: Optional[Permissions13] = None - - -class Invitee(SimpleUser): - pass - - -class Inviter(SimpleUser): - pass - - -class Permissions14(Enum): - read = 'read' - write = 'write' - admin = 'admin' - - -class RepositoryInvitation(BaseModel): - id: int = Field( - ..., description='Unique identifier of the repository invitation.', example=42 - ) - repository: MinimalRepository - invitee: Invitee - inviter: Inviter - permissions: Permissions14 = Field( - ..., - description='The permission associated with the invitation.', - example='read', - ) - created_at: datetime = Field(..., example='2016-06-13T14:52:50-05:00') - url: str = Field( - ..., - description='URL for the repository invitation', - example='https://api.github.com/user/repository-invitations/1', - ) - html_url: str = Field( - ..., example='https://github.com/octocat/Hello-World/invitations' - ) - node_id: str - - -class User13(SimpleUser): - pass - - -class CommitComment(BaseModel): - html_url: AnyUrl - url: AnyUrl - id: int - node_id: str - body: str - path: str - position: int - line: int - commit_id: str - user: User13 - created_at: datetime - updated_at: datetime - author_association: str - reactions: Optional[ReactionRollup] = None - - -class ScimError(BaseModel): - message: Optional[str] = None - documentation_url: Optional[str] = None - detail: Optional[str] = None - status: Optional[int] = None - scimType: Optional[str] = None - schemas: Optional[List[str]] = None - - -class Commit2(BaseModel): - sha: Optional[str] = None - url: Optional[str] = None - - -class BranchShort(BaseModel): - name: Optional[str] = None - commit: Optional[Commit2] = None - protected: Optional[bool] = None - - -class Link(BaseModel): - href: str - - -class User14(SimpleUser): - pass - - -class Milestone3(Milestone): - pass - - -class Assignee2(SimpleUser): - pass - - -class User15(SimpleUser): - pass - - -class Head1(BaseModel): - label: str - ref: str - repo: Repository - sha: str - user: User15 - - -class User16(SimpleUser): - pass - - -class Base1(BaseModel): - label: str - ref: str - repo: Repository - sha: str - user: User16 - - -class _Links2(BaseModel): - comments: Link - commits: Link - statuses: Link - html: Link - issue: Link - review_comments: Link - review_comment: Link - self: Link - - -class PullRequestSimple(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/1347' - ) - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDExOlB1bGxSZXF1ZXN0MQ==') - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347' - ) - diff_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347.diff' - ) - patch_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1347.patch' - ) - issue_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/issues/1347' - ) - commits_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits', - ) - review_comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments', - ) - review_comment_url: str = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}', - ) - comments_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/issues/1347/comments', - ) - statuses_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - number: int = Field(..., example=1347) - state: str = Field(..., example='open') - locked: bool = Field(..., example=True) - title: str = Field(..., example='new-feature') - user: User14 - body: str = Field(..., example='Please pull these awesome changes') - labels: List[Label] - milestone: Milestone3 - active_lock_reason: Optional[str] = Field(None, example='too heated') - created_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - updated_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - closed_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - merged_at: datetime = Field(..., example='2011-01-26T19:01:12Z') - merge_commit_sha: str = Field( - ..., example='e5bd3914e2e596debea16f433f57875b5b90bcd6' - ) - assignee: Assignee2 - assignees: Optional[List[SimpleUser]] = None - requested_reviewers: Optional[List[SimpleUser]] = None - requested_teams: Optional[List[TeamSimple]] = None - head: Head1 - base: Base1 - _links: _Links2 - author_association: str = Field(..., example='OWNER') - draft: Optional[bool] = Field( - None, - description='Indicates whether or not the pull request is a draft.', - example=False, - ) - - -class SimpleCommitStatus(BaseModel): - description: str - id: int - node_id: str - state: str - context: str - target_url: AnyUrl - required: Optional[bool] = None - avatar_url: AnyUrl - url: AnyUrl - created_at: datetime - updated_at: datetime - - -class CombinedCommitStatus(BaseModel): - state: str - statuses: List[SimpleCommitStatus] - sha: str - total_count: int - repository: MinimalRepository - commit_url: AnyUrl - url: AnyUrl - - -class CodeOfConductSimple(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/codes_of_conduct/citizen_code_of_conduct' - ) - key: str = Field(..., example='citizen_code_of_conduct') - name: str = Field(..., example='Citizen Code of Conduct') - html_url: AnyUrl - - -class CommunityHealthFile(BaseModel): - url: AnyUrl - html_url: AnyUrl - - -class CodeOfConduct1(CodeOfConductSimple): - pass - - -class License4(LicenseSimple): - pass - - -class Contributing(CommunityHealthFile): - pass - - -class Readme(CommunityHealthFile): - pass - - -class IssueTemplate(CommunityHealthFile): - pass - - -class PullRequestTemplate(CommunityHealthFile): - pass - - -class Files1(BaseModel): - code_of_conduct: CodeOfConduct1 - license: License4 - contributing: Contributing - readme: Readme - issue_template: IssueTemplate - pull_request_template: PullRequestTemplate - - -class CommunityProfile(BaseModel): - health_percentage: int = Field(..., example=100) - description: str = Field(..., example='My first repository on GitHub!') - documentation: str = Field(..., example='example.com') - files: Files1 - updated_at: datetime = Field(..., example='2017-02-28T19:09:29Z') - - -class DiffEntry(BaseModel): - sha: str = Field(..., example='bbcd538c8e72b8c175046e27cc8f907076331401') - filename: str = Field(..., example='file1.txt') - status: str = Field(..., example='added') - additions: int = Field(..., example=103) - deletions: int = Field(..., example=21) - changes: int = Field(..., example=124) - blob_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt', - ) - raw_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt', - ) - contents_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - patch: Optional[str] = Field( - None, - example='@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test', - ) - previous_filename: Optional[str] = Field(None, example='file.txt') - - -class Status3(Enum): - diverged = 'diverged' - ahead = 'ahead' - behind = 'behind' - identical = 'identical' - - -class CommitComparison(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/compare/master...topic', - ) - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/compare/master...topic' - ) - permalink_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17', - ) - diff_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/compare/master...topic.diff', - ) - patch_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/compare/master...topic.patch', - ) - base_commit: Commit - merge_base_commit: Commit - status: Status3 = Field(..., example='ahead') - ahead_by: int = Field(..., example=4) - behind_by: int = Field(..., example=5) - total_commits: int = Field(..., example=6) - commits: List[Commit] - files: List[DiffEntry] - - -class _Links3(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class Entry(BaseModel): - type: str - size: int - name: str - path: str - content: Optional[str] = None - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - _links: _Links3 - - -class _Links4(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class ContentTree(BaseModel): - type: str - size: int - name: str - path: str - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - entries: Optional[List[Entry]] = None - _links: _Links4 - - -class _Links5(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class ContentDirectoryItem(BaseModel): - type: str - size: int - name: str - path: str - content: Optional[str] = None - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - _links: _Links5 - - -class ContentDirectory(BaseModel): - __root__: List[ContentDirectoryItem] - - -class _Links6(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class ContentFile(BaseModel): - type: str - encoding: str - size: int - name: str - path: str - content: str - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - _links: _Links6 - target: Optional[str] = Field(None, example='"actual/actual.md"') - submodule_git_url: Optional[str] = Field( - None, example='"git://example.com/defunkt/dotjs.git"' - ) - - -class _Links7(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class ContentSymlink(BaseModel): - type: str - target: str - size: int - name: str - path: str - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - _links: _Links7 - - -class _Links8(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class ContentSubmodule(BaseModel): - type: str - submodule_git_url: AnyUrl - size: int - name: str - path: str - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - download_url: AnyUrl - _links: _Links8 - - -class _Links9(BaseModel): - self: Optional[str] = None - git: Optional[str] = None - html: Optional[str] = None - - -class Content1(BaseModel): - name: Optional[str] = None - path: Optional[str] = None - sha: Optional[str] = None - size: Optional[int] = None - url: Optional[str] = None - html_url: Optional[str] = None - git_url: Optional[str] = None - download_url: Optional[str] = None - type: Optional[str] = None - _links: Optional[_Links9] = None - - -class Author5(BaseModel): - date: Optional[str] = None - name: Optional[str] = None - email: Optional[str] = None - - -class Committer3(BaseModel): - date: Optional[str] = None - name: Optional[str] = None - email: Optional[str] = None - - -class Tree1(BaseModel): - url: Optional[str] = None - sha: Optional[str] = None - - -class Verification1(BaseModel): - verified: Optional[bool] = None - reason: Optional[str] = None - signature: Optional[str] = None - payload: Optional[str] = None - - -class Commit3(BaseModel): - sha: Optional[str] = None - node_id: Optional[str] = None - url: Optional[str] = None - html_url: Optional[str] = None - author: Optional[Author5] = None - committer: Optional[Committer3] = None - message: Optional[str] = None - tree: Optional[Tree1] = None - parents: Optional[List[Parent]] = None - verification: Optional[Verification1] = None - - -class FileCommit(BaseModel): - content: Optional[Content1] = None - commit: Optional[Commit3] = None - - -class Contributor(BaseModel): - login: Optional[str] = None - id: Optional[int] = None - node_id: Optional[str] = None - avatar_url: Optional[AnyUrl] = None - gravatar_id: Optional[str] = None - url: Optional[AnyUrl] = None - html_url: Optional[AnyUrl] = None - followers_url: Optional[AnyUrl] = None - following_url: Optional[str] = None - gists_url: Optional[str] = None - starred_url: Optional[str] = None - subscriptions_url: Optional[AnyUrl] = None - organizations_url: Optional[AnyUrl] = None - repos_url: Optional[AnyUrl] = None - events_url: Optional[str] = None - received_events_url: Optional[AnyUrl] = None - type: str - site_admin: Optional[bool] = None - contributions: int - email: Optional[str] = None - name: Optional[str] = None - - -class Creator3(SimpleUser): - pass - - -class PerformedViaGithubApp3(Integration): - pass - - -class Deployment(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example/deployments/1' - ) - id: int = Field(..., description='Unique identifier of the deployment', example=42) - node_id: str = Field(..., example='MDEwOkRlcGxveW1lbnQx') - sha: str = Field(..., example='a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d') - ref: str = Field( - ..., - description='The ref to deploy. This can be a branch, tag, or sha.', - example='topic-branch', - ) - task: str = Field( - ..., description='Parameter to specify a task to execute', example='deploy' - ) - payload: Dict[str, Any] - original_environment: Optional[str] = Field(None, example='staging') - environment: str = Field( - ..., - description='Name for the target deployment environment.', - example='production', - ) - description: str = Field(..., example='Deploy request from hubot') - creator: Creator3 - created_at: datetime = Field(..., example='2012-07-20T01:19:13Z') - updated_at: datetime = Field(..., example='2012-07-20T01:19:13Z') - statuses_url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/example/deployments/1/statuses', - ) - repository_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example' - ) - transient_environment: Optional[bool] = Field( - None, - description='Specifies if the given environment is will no longer exist at some point in hte future. Default: false.', - example=True, - ) - production_environment: Optional[bool] = Field( - None, - description='Specifies if the given environment is one that end-users directly interact with. Default: false.', - example=True, - ) - performed_via_github_app: Optional[PerformedViaGithubApp3] = None - - -class State2(Enum): - error = 'error' - failure = 'failure' - inactive = 'inactive' - pending = 'pending' - success = 'success' - queued = 'queued' - in_progress = 'in_progress' - - -class Creator4(SimpleUser): - pass - - -class PerformedViaGithubApp4(Integration): - pass - - -class DeploymentStatus(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/octocat/example/deployments/42/statuses/1', - ) - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDE2OkRlcGxveW1lbnRTdGF0dXMx') - state: State2 = Field( - ..., description='The state of the status.', example='success' - ) - creator: Creator4 - description: constr(max_length=140) = Field( - ..., - description='A short description of the status.', - example='Deployment finished successfully.', - ) - environment: Optional[str] = Field( - '', - description='The environment of the deployment that the status is for.', - example='production', - ) - target_url: AnyUrl = Field( - ..., - description='Deprecated: the URL to associate with this status.', - example='https://example.com/deployment/42/output', - ) - created_at: datetime = Field(..., example='2012-07-20T01:19:13Z') - updated_at: datetime = Field(..., example='2012-07-20T01:19:13Z') - deployment_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example/deployments/42' - ) - repository_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example' - ) - environment_url: Optional[AnyUrl] = Field( - '', description='The URL for accessing your environment.', example='' - ) - log_url: Optional[AnyUrl] = Field( - '', - description='The URL to associate with this status.', - example='https://example.com/deployment/42/output', - ) - performed_via_github_app: Optional[PerformedViaGithubApp4] = None - - -class ShortBlob(BaseModel): - url: Optional[str] = None - sha: Optional[str] = None - - -class Blob(BaseModel): - content: str - encoding: str - url: AnyUrl - sha: str - size: int - node_id: str - highlighted_content: Optional[str] = None - - -class Author6(BaseModel): - date: Optional[datetime] = Field( - None, description='Timestamp of the commit', example='2014-08-09T08:02:04+12:00' - ) - email: str = Field( - ..., - description='Git email address of the user', - example='monalisa.octocat@example.com', - ) - name: str = Field( - ..., description='Name of the git user', example='Monalisa Octocat' - ) - - -class Committer4(BaseModel): - date: Optional[datetime] = Field( - None, description='Timestamp of the commit', example='2014-08-09T08:02:04+12:00' - ) - email: str = Field( - ..., - description='Git email address of the user', - example='monalisa.octocat@example.com', - ) - name: str = Field( - ..., description='Name of the git user', example='Monalisa Octocat' - ) - - -class Tree2(BaseModel): - sha: Optional[str] = Field( - None, - description='SHA for the commit', - example='7638417db6d59f3c431d3e1f261cc637155684cd', - ) - url: Optional[AnyUrl] = None - - -class Verification2(BaseModel): - verified: Optional[bool] = None - reason: Optional[str] = None - signature: Optional[str] = None - payload: Optional[str] = None - - -class GitCommit(BaseModel): - sha: Optional[str] = Field( - None, - description='SHA for the commit', - example='7638417db6d59f3c431d3e1f261cc637155684cd', - ) - node_id: Optional[str] = None - url: Optional[AnyUrl] = None - author: Optional[Author6] = Field( - None, description='Identifying information for the git-user' - ) - committer: Optional[Committer4] = Field( - None, description='Identifying information for the git-user' - ) - message: Optional[str] = Field( - None, - description='Message describing the purpose of the commit', - example='Fix #42', - ) - tree: Optional[Tree2] = None - parents: Optional[List[Parent]] = None - verification: Optional[Verification2] = None - html_url: Optional[AnyUrl] = None - - -class Object(BaseModel): - type: Optional[str] = None - sha: Optional[constr(min_length=40, max_length=40)] = Field( - None, - description='SHA for the reference', - example='7638417db6d59f3c431d3e1f261cc637155684cd', - ) - url: Optional[AnyUrl] = None - - -class GitRef(BaseModel): - ref: Optional[str] = None - node_id: Optional[str] = None - url: Optional[AnyUrl] = None - object: Optional[Object] = None - - -class Tagger(BaseModel): - date: str - email: str - name: str - - -class Object1(BaseModel): - sha: str - type: str - url: AnyUrl - - -class GitTag(BaseModel): - node_id: str = Field( - ..., example='MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==' - ) - tag: str = Field(..., description='Name of the tag', example='v0.0.1') - sha: str = Field(..., example='940bd336248efae0f9ee5bc7b2d5c985887b16ac') - url: AnyUrl = Field( - ..., - description='URL for the tag', - example='https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac', - ) - message: str = Field( - ..., - description='Message describing the purpose of the tag', - example='Initial public release', - ) - tagger: Tagger - object: Object1 - verification: Optional[Verification] = None - - -class TreeItem(BaseModel): - path: Optional[str] = Field(None, example='"test/file.rb"') - mode: Optional[str] = Field(None, example='"040000"') - type: Optional[str] = Field(None, example='"tree"') - sha: Optional[str] = Field( - None, example='"23f6827669e43831def8a7ad935069c8bd418261"' - ) - size: Optional[int] = Field(None, example='12') - url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261"', - ) - - -class GitTree(BaseModel): - sha: str - url: AnyUrl - truncated: bool - tree: List[TreeItem] = Field( - ..., - description='Objects specifying a tree structure', - example=[ - { - 'path': 'file.rb', - 'mode': '100644', - 'type': 'blob', - 'size': 30, - 'sha': '44b4fc6d56897b048c772eb4087f854f46256132', - 'url': 'https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132', - 'properties': { - 'path': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'type': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'sha': {'type': 'string'}, - 'url': {'type': 'string'}, - }, - 'required': ['path', 'mode', 'type', 'sha', 'url', 'size'], - } - ], - ) - - -class HookResponse(BaseModel): - code: int - status: str - message: str - - -class Config1(BaseModel): - email: Optional[str] = Field(None, example='"foo@bar.com"') - password: Optional[str] = Field(None, example='"foo"') - room: Optional[str] = Field(None, example='"roomer"') - subdomain: Optional[str] = Field(None, example='"foo"') - url: Optional[str] = Field(None, example='"http://bar.com"') - insecure_ssl: Optional[str] = Field(None, example='"0"') - content_type: Optional[str] = Field(None, example='"form"') - digest: Optional[str] = Field(None, example='"md5"') - secret: Optional[str] = Field(None, example='"********"') - token: Optional[str] = Field(None, example='"abc"') - - -class Hook(BaseModel): - type: str - id: int = Field(..., description='Unique identifier of the webhook.', example=42) - name: str = Field( - ..., - description="The name of a valid service, use 'web' for a webhook.", - example='web', - ) - active: bool = Field( - ..., - description='Determines whether the hook is actually triggered on pushes.', - example=True, - ) - events: List[str] = Field( - ..., - description="Determines what events the hook is triggered for. Default: ['push'].", - example=['push', 'pull_request'], - ) - config: Config1 - updated_at: datetime = Field(..., example='2011-09-06T20:39:23Z') - created_at: datetime = Field(..., example='2011-09-06T17:26:27Z') - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/hooks/1' - ) - test_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/hooks/1/test' - ) - ping_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/hooks/1/pings' - ) - last_response: HookResponse - - -class Status4(Enum): - auth = 'auth' - error = 'error' - none = 'none' - detecting = 'detecting' - choose = 'choose' - auth_failed = 'auth_failed' - importing = 'importing' - mapping = 'mapping' - waiting_to_push = 'waiting_to_push' - pushing = 'pushing' - complete = 'complete' - setup = 'setup' - unknown = 'unknown' - detection_found_multiple = 'detection_found_multiple' - detection_found_nothing = 'detection_found_nothing' - detection_needs_auth = 'detection_needs_auth' - - -class ProjectChoice(BaseModel): - vcs: Optional[str] = None - tfvc_project: Optional[str] = None - human_name: Optional[str] = None - - -class Import(BaseModel): - vcs: str - use_lfs: Optional[str] = None - vcs_url: str = Field(..., description='The URL of the originating repository.') - svc_root: Optional[str] = None - tfvc_project: Optional[str] = None - status: Status4 - status_text: Optional[str] = None - failed_step: Optional[str] = None - error_message: Optional[str] = None - import_percent: Optional[int] = None - commit_count: Optional[int] = None - push_percent: Optional[int] = None - has_large_files: Optional[bool] = None - large_files_size: Optional[int] = None - large_files_count: Optional[int] = None - project_choices: Optional[List[ProjectChoice]] = None - message: Optional[str] = None - authors_count: Optional[int] = None - url: AnyUrl - html_url: AnyUrl - authors_url: AnyUrl - repository_url: AnyUrl - svn_root: Optional[str] = None - - -class PorterAuthor(BaseModel): - id: int - remote_id: str - remote_name: str - email: str - name: str - url: AnyUrl - import_url: AnyUrl - - -class PorterLargeFile(BaseModel): - ref_name: str - path: str - oid: str - size: int - - -class IssueEventLabel(BaseModel): - name: str - color: str - - -class IssueEventDismissedReview(BaseModel): - state: str - review_id: int - dismissal_message: str - dismissal_commit_id: Optional[str] = None - - -class IssueEventMilestone(BaseModel): - title: str - - -class IssueEventProjectCard(BaseModel): - url: AnyUrl - id: int - project_url: AnyUrl - project_id: int - column_name: str - previous_column_name: Optional[str] = None - - -class IssueEventRename(BaseModel): - from_: str = Field(..., alias='from') - to: str - - -class Actor1(SimpleUser): - pass - - -class Assignee3(SimpleUser): - pass - - -class Assigner(SimpleUser): - pass - - -class ReviewRequester(SimpleUser): - pass - - -class RequestedReviewer(SimpleUser): - pass - - -class IssueEvent(BaseModel): - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDEwOklzc3VlRXZlbnQx') - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/issues/events/1' - ) - actor: Actor1 - event: str = Field(..., example='closed') - commit_id: str = Field(..., example='6dcb09b5b57875f334f61aebed695e2e4193db5e') - commit_url: str = Field( - ..., - example='https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - created_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - issue: Optional[IssueSimple] = None - label: Optional[IssueEventLabel] = None - assignee: Optional[Assignee3] = None - assigner: Optional[Assigner] = None - review_requester: Optional[ReviewRequester] = None - requested_reviewer: Optional[RequestedReviewer] = None - requested_team: Optional[Team] = None - dismissed_review: Optional[IssueEventDismissedReview] = None - milestone: Optional[IssueEventMilestone] = None - project_card: Optional[IssueEventProjectCard] = None - rename: Optional[IssueEventRename] = None - author_association: Optional[str] = None - lock_reason: Optional[str] = None - - -class IssueEventForIssue(BaseModel): - id: Optional[int] = None - node_id: Optional[str] = None - url: Optional[str] = None - actor: Optional[SimpleUser] = None - event: Optional[str] = None - commit_id: Optional[str] = None - commit_url: Optional[str] = None - created_at: Optional[str] = None - sha: Optional[str] = Field( - None, example='"480d4f47447129f015cb327536c522ca683939a1"' - ) - html_url: Optional[str] = Field( - None, - example='"https://github.com/owner-3906e11a33a3d55ba449d63f/BBB_Private_Repo/commit/480d4f47447129f015cb327536c522ca683939a1"', - ) - message: Optional[str] = Field(None, example='"add a bunch of files"') - issue_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/owner-3906e11a33a3d55ba449d63f/AAA_Public_Repo/issues/1"', - ) - updated_at: Optional[str] = Field(None, example='"2020-07-09T00:17:36Z"') - author_association: Optional[str] = Field(None, example='"COLLABORATOR"') - body: Optional[str] = Field(None, example='":+1:"') - lock_reason: Optional[str] = Field(None, example='"off-topic"') - submitted_at: Optional[str] = Field(None, example='"2020-07-09T00:17:51Z"') - state: Optional[str] = Field(None, example='"commented"') - pull_request_url: Optional[str] = Field( - None, - example='"https://api.github.com/repos/owner-3906e11a33a3d55ba449d63f/AAA_Public_Repo/pulls/2"', - ) - body_html: Optional[str] = Field( - None, - example='"

Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam.

"', - ) - body_text: Optional[str] = Field( - None, - example='"Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam."', - ) - - -class DeployKey(BaseModel): - id: Optional[int] = None - key: Optional[str] = None - url: Optional[str] = None - title: Optional[str] = None - verified: Optional[bool] = None - created_at: Optional[str] = None - read_only: Optional[bool] = None - - -class Language(BaseModel): - pass - - class Config: - extra = Extra.allow - - -class _Links10(BaseModel): - git: AnyUrl - html: AnyUrl - self: AnyUrl - - -class License5(LicenseSimple): - pass - - -class LicenseContent(BaseModel): - name: str - path: str - sha: str - size: int - url: AnyUrl - html_url: AnyUrl - git_url: AnyUrl - download_url: AnyUrl - type: str - content: str - encoding: str - _links: _Links10 - license: License5 - - -class PagesSourceHash(BaseModel): - branch: str - path: str - - -class Status5(Enum): - built = 'built' - building = 'building' - errored = 'errored' - - -class Error1(BaseModel): - message: str - - -class Pusher(SimpleUser): - pass - - -class PageBuild(BaseModel): - url: AnyUrl - status: str - error: Error1 - pusher: Pusher - commit: str - duration: int - created_at: datetime - updated_at: datetime - - -class PageBuildStatus(BaseModel): - url: AnyUrl = Field( - ..., - example='https://api.github.com/repos/github/hello-world/pages/builds/latest', - ) - status: str = Field(..., example='queued') - - -class State3(Enum): - open = 'open' - closed = 'closed' - - -class User17(SimpleUser): - pass - - -class Milestone4(Milestone): - pass - - -class Assignee4(SimpleUser): - pass - - -class Owner10(BaseModel): - avatar_url: AnyUrl - events_url: str - followers_url: AnyUrl - following_url: str - gists_url: str - gravatar_id: str - html_url: AnyUrl - id: int - node_id: str - login: str - organizations_url: AnyUrl - received_events_url: AnyUrl - repos_url: AnyUrl - site_admin: bool - starred_url: str - subscriptions_url: AnyUrl - type: str - url: AnyUrl - - -class Permissions15(BaseModel): - admin: bool - pull: bool - push: bool - - -class License6(BaseModel): - key: str - name: str - url: AnyUrl - spdx_id: str - node_id: str - - -class Repo3(BaseModel): - archive_url: str - assignees_url: str - blobs_url: str - branches_url: str - collaborators_url: str - comments_url: str - commits_url: str - compare_url: str - contents_url: str - contributors_url: AnyUrl - deployments_url: AnyUrl - description: str - downloads_url: AnyUrl - events_url: AnyUrl - fork: bool - forks_url: AnyUrl - full_name: str - git_commits_url: str - git_refs_url: str - git_tags_url: str - hooks_url: AnyUrl - html_url: AnyUrl - id: int - node_id: str - issue_comment_url: str - issue_events_url: str - issues_url: str - keys_url: str - labels_url: str - languages_url: AnyUrl - merges_url: AnyUrl - milestones_url: str - name: str - notifications_url: str - owner: Owner10 - private: bool - pulls_url: str - releases_url: str - stargazers_url: AnyUrl - statuses_url: str - subscribers_url: AnyUrl - subscription_url: AnyUrl - tags_url: AnyUrl - teams_url: AnyUrl - trees_url: str - url: AnyUrl - clone_url: str - default_branch: str - forks: int - forks_count: int - git_url: str - has_downloads: bool - has_issues: bool - has_projects: bool - has_wiki: bool - has_pages: bool - homepage: Optional[AnyUrl] = None - language: Optional[str] = None - master_branch: Optional[str] = None - archived: bool - disabled: bool - mirror_url: Optional[AnyUrl] = None - open_issues: int - open_issues_count: int - permissions: Optional[Permissions15] = None - temp_clone_token: Optional[str] = None - allow_merge_commit: Optional[bool] = None - allow_squash_merge: Optional[bool] = None - allow_rebase_merge: Optional[bool] = None - license: License6 - pushed_at: datetime - size: int - ssh_url: str - stargazers_count: int - svn_url: AnyUrl - topics: Optional[List[str]] = None - watchers: int - watchers_count: int - created_at: datetime - updated_at: datetime - - -class User18(BaseModel): - avatar_url: AnyUrl - events_url: str - followers_url: AnyUrl - following_url: str - gists_url: str - gravatar_id: str - html_url: AnyUrl - id: int - node_id: str - login: str - organizations_url: AnyUrl - received_events_url: AnyUrl - repos_url: AnyUrl - site_admin: bool - starred_url: str - subscriptions_url: AnyUrl - type: str - url: AnyUrl - - -class Head2(BaseModel): - label: str - ref: str - repo: Optional[Repo3] = None - sha: str - user: User18 - - -class Owner11(BaseModel): - avatar_url: AnyUrl - events_url: str - followers_url: AnyUrl - following_url: str - gists_url: str - gravatar_id: str - html_url: AnyUrl - id: int - node_id: str - login: str - organizations_url: AnyUrl - received_events_url: AnyUrl - repos_url: AnyUrl - site_admin: bool - starred_url: str - subscriptions_url: AnyUrl - type: str - url: AnyUrl - - -class Permissions16(BaseModel): - admin: bool - pull: bool - push: bool - - -class License7(LicenseSimple): - pass - - -class Repo4(BaseModel): - archive_url: str - assignees_url: str - blobs_url: str - branches_url: str - collaborators_url: str - comments_url: str - commits_url: str - compare_url: str - contents_url: str - contributors_url: AnyUrl - deployments_url: AnyUrl - description: str - downloads_url: AnyUrl - events_url: AnyUrl - fork: bool - forks_url: AnyUrl - full_name: str - git_commits_url: str - git_refs_url: str - git_tags_url: str - hooks_url: AnyUrl - html_url: AnyUrl - id: int - node_id: str - issue_comment_url: str - issue_events_url: str - issues_url: str - keys_url: str - labels_url: str - languages_url: AnyUrl - merges_url: AnyUrl - milestones_url: str - name: str - notifications_url: str - owner: Owner11 - private: bool - pulls_url: str - releases_url: str - stargazers_url: AnyUrl - statuses_url: str - subscribers_url: AnyUrl - subscription_url: AnyUrl - tags_url: AnyUrl - teams_url: AnyUrl - trees_url: str - url: AnyUrl - clone_url: str - default_branch: str - forks: int - forks_count: int - git_url: str - has_downloads: bool - has_issues: bool - has_projects: bool - has_wiki: bool - has_pages: bool - homepage: Optional[AnyUrl] = None - language: Optional[str] = None - master_branch: Optional[str] = None - archived: bool - disabled: bool - mirror_url: Optional[AnyUrl] = None - open_issues: int - open_issues_count: int - permissions: Optional[Permissions16] = None - temp_clone_token: Optional[str] = None - allow_merge_commit: Optional[bool] = None - allow_squash_merge: Optional[bool] = None - allow_rebase_merge: Optional[bool] = None - license: License7 - pushed_at: datetime - size: int - ssh_url: str - stargazers_count: int - svn_url: AnyUrl - topics: Optional[List[str]] = None - watchers: int - watchers_count: int - created_at: datetime - updated_at: datetime - - -class User19(BaseModel): - avatar_url: AnyUrl - events_url: str - followers_url: AnyUrl - following_url: str - gists_url: str - gravatar_id: str - html_url: AnyUrl - id: int - node_id: str - login: str - organizations_url: AnyUrl - received_events_url: AnyUrl - repos_url: AnyUrl - site_admin: bool - starred_url: str - subscriptions_url: AnyUrl - type: str - url: AnyUrl - - -class Base2(BaseModel): - label: str - ref: str - repo: Optional[Repo4] = None - sha: str - user: User19 - - -class _Links11(BaseModel): - comments: Link - commits: Link - statuses: Link - html: Link - issue: Link - review_comments: Link - review_comment: Link - self: Link - - -class MergedBy(SimpleUser): - pass - - -class Self(BaseModel): - href: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/comments/1' - ) - - -class Html(BaseModel): - href: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1#discussion-diff-1' - ) - - -class PullRequest2(BaseModel): - href: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/1' - ) - - -class _Links12(BaseModel): - self: Self - html: Html - pull_request: PullRequest2 - - -class StartSide(Enum): - LEFT = 'LEFT' - RIGHT = 'RIGHT' - - -class Side(Enum): - LEFT = 'LEFT' - RIGHT = 'RIGHT' - - -class PullRequestReviewComment(BaseModel): - url: str = Field( - ..., - description='URL for the pull request review comment', - example='https://api.github.com/repos/octocat/Hello-World/pulls/comments/1', - ) - pull_request_review_id: int = Field( - ..., - description='The ID of the pull request review to which the comment belongs.', - example=42, - ) - id: int = Field( - ..., description='The ID of the pull request review comment.', example=1 - ) - node_id: str = Field( - ..., - description='The node ID of the pull request review comment.', - example='MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw', - ) - diff_hunk: str = Field( - ..., - description='The diff of the line that the comment refers to.', - example='@@ -16,33 +16,40 @@ public class Connection : IConnection...', - ) - path: str = Field( - ..., - description='The relative path of the file to which the comment applies.', - example='config/database.yaml', - ) - position: int = Field( - ..., - description='The line index in the diff to which the comment applies.', - example=1, - ) - original_position: int = Field( - ..., - description='The index of the original line in the diff to which the comment applies.', - example=4, - ) - commit_id: str = Field( - ..., - description='The SHA of the commit to which the comment applies.', - example='6dcb09b5b57875f334f61aebed695e2e4193db5e', - ) - original_commit_id: str = Field( - ..., - description='The SHA of the original commit to which the comment applies.', - example='9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840', - ) - in_reply_to_id: Optional[int] = Field( - None, description='The comment ID to reply to.', example=8 - ) - user: SimpleUser - body: str = Field( - ..., - description='The text of the comment.', - example='We should probably include a check for null values here.', - ) - created_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - updated_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - html_url: AnyUrl = Field( - ..., - description='HTML URL for the pull request review comment.', - example='https://github.com/octocat/Hello-World/pull/1#discussion-diff-1', - ) - pull_request_url: AnyUrl = Field( - ..., - description='URL for the pull request that the review comment belongs to.', - example='https://api.github.com/repos/octocat/Hello-World/pulls/1', - ) - author_association: str = Field( - ..., - description='How the author of the comment is associated with the pull request.', - example='', - ) - _links: _Links12 - start_line: Optional[int] = Field( - None, - description='The first line of the range for a multi-line comment.', - example=2, - ) - original_start_line: Optional[int] = Field( - None, - description='The first line of the range for a multi-line comment.', - example=2, - ) - start_side: Optional[StartSide] = Field( - 'RIGHT', - description='The side of the first line of the range for a multi-line comment.', - ) - line: Optional[int] = Field( - None, - description='The line of the blob to which the comment applies. The last line of the range for a multi-line comment', - example=2, - ) - original_line: Optional[int] = Field( - None, - description='The line of the blob to which the comment applies. The last line of the range for a multi-line comment', - example=2, - ) - side: Optional[Side] = Field( - 'RIGHT', - description='The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment', - ) - reactions: Optional[ReactionRollup] = None - body_html: Optional[str] = Field(None, example='"

comment body

"') - body_text: Optional[str] = Field(None, example='"comment body"') - - -class PullRequestMergeResult(BaseModel): - sha: str - merged: bool - message: str - - -class PullRequestReviewRequest(BaseModel): - users: Optional[List[User]] = None - teams: Optional[List[Team]] = None - - -class User20(SimpleUser): - pass - - -class Html1(BaseModel): - href: str - - -class PullRequest3(BaseModel): - href: str - - -class _Links13(BaseModel): - html: Html1 - pull_request: PullRequest3 - - -class PullRequestReview(BaseModel): - id: int = Field(..., description='Unique identifier of the review', example=42) - node_id: str = Field(..., example='MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=') - user: User20 - body: str = Field( - ..., description='The text of the review.', example='This looks great.' - ) - state: str = Field(..., example='CHANGES_REQUESTED') - html_url: AnyUrl = Field( - ..., - example='https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80', - ) - pull_request_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/12' - ) - _links: _Links13 - submitted_at: Optional[datetime] = None - commit_id: str = Field( - ..., - description='A commit SHA for the review.', - example='54bb654c9e6025347f57900a4a5c2313a96b8035', - ) - body_html: Optional[str] = None - body_text: Optional[str] = None - author_association: str - - -class User21(SimpleUser): - pass - - -class _Links14(BaseModel): - self: Link - html: Link - pull_request: Link - - -class Side1(Enum): - LEFT = 'LEFT' - RIGHT = 'RIGHT' - - -class StartSide1(Enum): - LEFT = 'LEFT' - RIGHT = 'RIGHT' - - -class ReviewComment(BaseModel): - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/comments/1' - ) - pull_request_review_id: int = Field(..., example=42) - id: int = Field(..., example=10) - node_id: str = Field(..., example='MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw') - diff_hunk: str = Field( - ..., example='@@ -16,33 +16,40 @@ public class Connection : IConnection...' - ) - path: str = Field(..., example='file1.txt') - position: int = Field(..., example=1) - original_position: int = Field(..., example=4) - commit_id: str = Field(..., example='6dcb09b5b57875f334f61aebed695e2e4193db5e') - original_commit_id: str = Field( - ..., example='9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840' - ) - in_reply_to_id: Optional[int] = Field(None, example=8) - user: User21 - body: str = Field(..., example='Great stuff') - created_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - updated_at: datetime = Field(..., example='2011-04-14T16:00:49Z') - html_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/pull/1#discussion-diff-1' - ) - pull_request_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/Hello-World/pulls/1' - ) - author_association: str - _links: _Links14 - body_text: Optional[str] = None - body_html: Optional[str] = None - side: Optional[Side1] = Field( - 'RIGHT', - description='The side of the first line of the range for a multi-line comment.', - ) - start_side: Optional[StartSide1] = Field( - 'RIGHT', - description='The side of the first line of the range for a multi-line comment.', - ) - line: Optional[int] = Field( - None, - description='The line of the blob to which the comment applies. The last line of the range for a multi-line comment', - example=2, - ) - original_line: Optional[int] = Field( - None, - description='The original line of the blob to which the comment applies. The last line of the range for a multi-line comment', - example=2, - ) - start_line: Optional[int] = Field( - None, - description='The first line of the range for a multi-line comment.', - example=2, - ) - original_start_line: Optional[int] = Field( - None, - description='The original first line of the range for a multi-line comment.', - example=2, - ) - - -class State4(Enum): - uploaded = 'uploaded' - - -class Uploader(SimpleUser): - pass - - -class ReleaseAsset(BaseModel): - url: AnyUrl - browser_download_url: AnyUrl - id: int - node_id: str - name: str = Field( - ..., description='The file name of the asset.', example='Team Environment' - ) - label: str - state: State4 = Field( - ..., description='State of the release asset.', example='open' - ) - content_type: str - size: int - download_count: int - created_at: datetime - updated_at: datetime - uploader: Uploader - - -class Release(BaseModel): - url: AnyUrl - html_url: AnyUrl - assets_url: AnyUrl - upload_url: str - tarball_url: AnyUrl - zipball_url: AnyUrl - id: int - node_id: str - tag_name: str = Field(..., description='The name of the tag.', example='v1.0.0') - target_commitish: str = Field( - ..., - description='Specifies the commitish value that determines where the Git tag is created from.', - example='master', - ) - name: str - body: Optional[str] = None - draft: bool = Field( - ..., - description='true to create a draft (unpublished) release, false to create a published one.', - example=False, - ) - prerelease: bool = Field( - ..., - description='Whether to identify the release as a prerelease or a full release.', - example=False, - ) - created_at: datetime - published_at: datetime - author: SimpleUser - assets: List[ReleaseAsset] - body_html: Optional[str] = None - body_text: Optional[str] = None - - -class User22(SimpleUser): - pass - - -class Stargazer(BaseModel): - starred_at: datetime - user: User22 - - -class CodeFrequencyStat(BaseModel): - __root__: List[int] - - -class CommitActivity(BaseModel): - days: List[int] = Field(..., example=[0, 3, 26, 20, 39, 1, 0]) - total: int = Field(..., example=89) - week: int = Field(..., example=1336280400) - - -class Author7(SimpleUser): - pass - - -class Week(BaseModel): - w: Optional[str] = None - a: Optional[int] = None - d: Optional[int] = None - c: Optional[int] = None - - -class ContributorActivity(BaseModel): - author: Author7 - total: int = Field(..., example=135) - weeks: List[Week] = Field( - ..., example=[{'w': '1367712000', 'a': 6898, 'd': 77, 'c': 10}] - ) - - -class ParticipationStats(BaseModel): - all: Optional[List[int]] = None - owner: Optional[List[int]] = None - - -class RepositorySubscription(BaseModel): - subscribed: bool = Field( - ..., - description='Determines if notifications should be received from this repository.', - example=True, - ) - ignored: bool = Field( - ..., - description='Determines if all notifications should be blocked from this repository.', - ) - reason: str - created_at: datetime = Field(..., example='2012-10-06T21:34:12Z') - url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example/subscription' - ) - repository_url: AnyUrl = Field( - ..., example='https://api.github.com/repos/octocat/example' - ) - - -class Commit4(BaseModel): - sha: str - url: AnyUrl - - -class Tag(BaseModel): - name: str = Field(..., example='v0.1') - commit: Commit4 - zipball_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/zipball/v0.1' - ) - tarball_url: AnyUrl = Field( - ..., example='https://github.com/octocat/Hello-World/tarball/v0.1' - ) - node_id: str - - -class Topic(BaseModel): - names: Optional[List[str]] = None - - -class Traffic(BaseModel): - timestamp: datetime - uniques: int - count: int - - -class CloneTraffic(BaseModel): - count: int = Field(..., example=173) - uniques: int = Field(..., example=128) - clones: List[Traffic] - - -class ContentTraffic(BaseModel): - path: str = Field(..., example='/github/hubot') - title: str = Field( - ..., example='github/hubot: A customizable life embetterment robot.' - ) - count: int = Field(..., example=3542) - uniques: int = Field(..., example=2225) - - -class ReferrerTraffic(BaseModel): - referrer: str = Field(..., example='Google') - count: int = Field(..., example=4) - uniques: int = Field(..., example=3) - - -class ViewTraffic(BaseModel): - count: int = Field(..., example=14850) - uniques: int = Field(..., example=3782) - views: List[Traffic] - - -class Member(BaseModel): - value: Optional[str] = None - _ref: Optional[str] = Field(None, alias='$ref') - display: Optional[str] = None - - -class Meta(BaseModel): - resourceType: Optional[str] = None - created: Optional[str] = None - lastModified: Optional[str] = None - location: Optional[str] = None - - -class Resource(BaseModel): - schemas: Optional[List[str]] = None - id: Optional[str] = None - externalId: Optional[str] = None - userName: Optional[str] = None - name: Optional[Name] = None - emails: Optional[List[Email]] = None - groups: Optional[List[Group]] = None - active: Optional[bool] = None - meta: Optional[Meta2] = None - - -class ScimGroupListEnterprise(BaseModel): - schemas: Optional[List[str]] = None - totalResults: Optional[float] = None - itemsPerPage: Optional[float] = None - startIndex: Optional[float] = None - Resources: Optional[List[Resource]] = None - - -class Meta1(BaseModel): - resourceType: Optional[str] = None - created: Optional[str] = None - lastModified: Optional[str] = None - location: Optional[str] = None - - -class ScimEnterpriseGroup(BaseModel): - schemas: Optional[List[str]] = None - id: Optional[str] = None - externalId: Optional[str] = None - displayName: Optional[str] = None - members: Optional[List[Member]] = None - meta: Optional[Meta1] = None - - -class Name(BaseModel): - givenName: Optional[str] = None - familyName: Optional[str] = None - - -class Email(BaseModel): - email: Optional[str] = None - verified: Optional[bool] = None - - -class Meta2(BaseModel): - resourceType: Optional[str] = None - created: Optional[str] = None - lastModified: Optional[str] = None - location: Optional[str] = None - - -class ScimUserListEnterprise(BaseModel): - schemas: Optional[List[str]] = None - totalResults: Optional[float] = None - itemsPerPage: Optional[float] = None - startIndex: Optional[float] = None - Resources: Optional[List[Resource]] = None - - -class Name1(BaseModel): - givenName: Optional[str] = None - familyName: Optional[str] = None - - -class Meta3(BaseModel): - resourceType: Optional[str] = None - created: Optional[str] = None - lastModified: Optional[str] = None - location: Optional[str] = None - - -class ScimEnterpriseUser(BaseModel): - schemas: Optional[List[str]] = None - id: Optional[str] = None - externalId: Optional[str] = None - userName: Optional[str] = None - name: Optional[Name1] = None - emails: Optional[List[Email]] = None - groups: Optional[List[Group]] = None - active: Optional[bool] = None - meta: Optional[Meta3] = None - - -class Name2(BaseModel): - givenName: str - familyName: str - formatted: Optional[str] = None - - -class Meta4(BaseModel): - resourceType: Optional[str] = Field(None, example='User') - created: Optional[datetime] = Field(None, example='2019-01-24T22:45:36.000Z') - lastModified: Optional[datetime] = Field(None, example='2019-01-24T22:45:36.000Z') - location: Optional[AnyUrl] = Field( - None, - example='https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d', - ) - - -class Op(Enum): - add = 'add' - remove = 'remove' - replace = 'replace' - - -class Operation(BaseModel): - op: Op - path: Optional[str] = None - value: Optional[Union[str, Dict[str, Any], List[Any]]] = None - - -class ScimUser(BaseModel): - schemas: List[str] = Field(..., description='SCIM schema used.') - id: str = Field( - ..., - description='Unique identifier of an external identity', - example='1b78eada-9baa-11e6-9eb6-a431576d590e', - ) - externalId: str = Field( - ..., description='The ID of the User.', example='a7b0f98395' - ) - userName: str = Field( - ..., - description='Configured by the admin. Could be an email, login, or username', - example='someone@example.com', - ) - displayName: Optional[str] = Field( - None, - description='The name of the user, suitable for display to end-users', - example='Jon Doe', - ) - name: Name2 = Field(..., example='Jane User') - emails: List[Email] = Field( - ..., - description='user emails', - example=['someone@example.com', 'another@example.com'], - ) - active: bool = Field( - ..., description='The active status of the User.', example=True - ) - meta: Meta4 - organization_id: Optional[int] = Field( - None, description='The ID of the organization.' - ) - operations: Optional[List[Operation]] = Field( - None, - description='Set of operations to be performed', - example=[{'op': 'replace', 'value': {'active': False}}], - ) - groups: Optional[List[Group]] = Field(None, description='associated groups') - - -class ScimUserList(BaseModel): - schemas: List[str] = Field(..., description='SCIM schema used.') - totalResults: int = Field(..., example=3) - itemsPerPage: int = Field(..., example=10) - startIndex: int = Field(..., example=1) - Resources: List[ScimUser] - - -class Match(BaseModel): - text: Optional[str] = None - indices: Optional[List[int]] = None - - -class SearchResultTextMatch(BaseModel): - object_url: Optional[str] = None - object_type: Optional[str] = None - property: Optional[str] = None - fragment: Optional[str] = None - matches: Optional[List[Match]] = None - - -class SearchResultTextMatches(BaseModel): - __root__: List[SearchResultTextMatch] - - -class CodeSearchResultItem(BaseModel): - name: str - path: str - sha: str - url: AnyUrl - git_url: AnyUrl - html_url: AnyUrl - repository: MinimalRepository - score: int - file_size: Optional[int] = None - language: Optional[str] = None - last_modified_at: Optional[datetime] = None - line_numbers: Optional[List[str]] = None - text_matches: Optional[SearchResultTextMatches] = None - - -class Author8(BaseModel): - name: str - email: str - date: datetime - - -class Committer5(GitUser): - pass - - -class Tree3(BaseModel): - sha: str - url: AnyUrl - - -class Commit5(BaseModel): - author: Author8 - committer: Committer5 - comment_count: int - message: str - tree: Tree3 - url: AnyUrl - verification: Optional[Verification] = None - - -class Author9(SimpleUser): - pass - - -class Committer6(GitUser): - pass - - -class CommitSearchResultItem(BaseModel): - url: AnyUrl - sha: str - html_url: AnyUrl - comments_url: AnyUrl - commit: Commit5 - author: Author9 - committer: Committer6 - parents: List[Parent] - repository: MinimalRepository - score: int - node_id: str - text_matches: Optional[SearchResultTextMatches] = None - - -class User23(SimpleUser): - pass - - -class Assignee5(SimpleUser): - pass - - -class Milestone5(Milestone): - pass - - -class PullRequest4(BaseModel): - merged_at: Optional[datetime] = None - diff_url: AnyUrl - html_url: AnyUrl - patch_url: AnyUrl - url: AnyUrl - - -class PerformedViaGithubApp5(Integration): - pass - - -class IssueSearchResultItem(BaseModel): - url: AnyUrl - repository_url: AnyUrl - labels_url: str - comments_url: AnyUrl - events_url: AnyUrl - html_url: AnyUrl - id: int - node_id: str - number: int - title: str - locked: bool - active_lock_reason: Optional[str] = None - assignees: Optional[List[SimpleUser]] = None - user: User23 - labels: List[Label] - state: str - assignee: Assignee5 - milestone: Milestone5 - comments: int - created_at: datetime - updated_at: datetime - closed_at: datetime - text_matches: Optional[SearchResultTextMatches] = None - pull_request: Optional[PullRequest4] = None - body: Optional[str] = None - score: int - author_association: str - draft: Optional[bool] = None - repository: Optional[Repository] = None - body_html: Optional[str] = None - body_text: Optional[str] = None - timeline_url: Optional[AnyUrl] = None - performed_via_github_app: Optional[PerformedViaGithubApp5] = None - - -class LabelSearchResultItem(BaseModel): - id: int - node_id: str - url: AnyUrl - name: str - color: str - default: bool - description: str - score: int - text_matches: Optional[SearchResultTextMatches] = None - - -class Owner12(SimpleUser): - pass - - -class License8(LicenseSimple): - pass - - -class Permissions17(BaseModel): - admin: bool - pull: bool - push: bool - - -class RepoSearchResultItem(BaseModel): - id: int - node_id: str - name: str - full_name: str - owner: Owner12 - private: bool - html_url: AnyUrl - description: str - fork: bool - url: AnyUrl - created_at: datetime - updated_at: datetime - pushed_at: datetime - homepage: AnyUrl - size: int - stargazers_count: int - watchers_count: int - language: str - forks_count: int - open_issues_count: int - master_branch: Optional[str] = None - default_branch: str - score: int - forks_url: AnyUrl - keys_url: str - collaborators_url: str - teams_url: AnyUrl - hooks_url: AnyUrl - issue_events_url: str - events_url: AnyUrl - assignees_url: str - branches_url: str - tags_url: AnyUrl - blobs_url: str - git_tags_url: str - git_refs_url: str - trees_url: str - statuses_url: str - languages_url: AnyUrl - stargazers_url: AnyUrl - contributors_url: AnyUrl - subscribers_url: AnyUrl - subscription_url: AnyUrl - commits_url: str - git_commits_url: str - comments_url: str - issue_comment_url: str - contents_url: str - compare_url: str - merges_url: AnyUrl - archive_url: str - downloads_url: AnyUrl - issues_url: str - pulls_url: str - milestones_url: str - notifications_url: str - labels_url: str - releases_url: str - deployments_url: AnyUrl - git_url: str - ssh_url: str - clone_url: str - svn_url: AnyUrl - forks: int - open_issues: int - watchers: int - topics: Optional[List[str]] = None - mirror_url: AnyUrl - has_issues: bool - has_projects: bool - has_pages: bool - has_wiki: bool - has_downloads: bool - archived: bool - disabled: bool = Field( - ..., description='Returns whether or not this repository disabled.' - ) - license: License8 - permissions: Optional[Permissions17] = None - text_matches: Optional[SearchResultTextMatches] = None - temp_clone_token: Optional[str] = None - allow_merge_commit: Optional[bool] = None - allow_squash_merge: Optional[bool] = None - allow_rebase_merge: Optional[bool] = None - delete_branch_on_merge: Optional[bool] = None - - -class TopicRelation(BaseModel): - id: Optional[int] = None - name: Optional[str] = None - topic_id: Optional[int] = None - relation_type: Optional[str] = None - - -class RelatedItem(BaseModel): - topic_relation: Optional[TopicRelation] = None - - -class TopicRelation1(BaseModel): - id: Optional[int] = None - name: Optional[str] = None - topic_id: Optional[int] = None - relation_type: Optional[str] = None - - -class Alias(BaseModel): - topic_relation: Optional[TopicRelation1] = None - - -class TopicSearchResultItem(BaseModel): - name: str - display_name: str - short_description: str - description: str - created_by: str - released: str - created_at: datetime - updated_at: datetime - featured: bool - curated: bool - score: int - repository_count: Optional[int] = None - logo_url: Optional[AnyUrl] = None - text_matches: Optional[SearchResultTextMatches] = None - related: Optional[List[RelatedItem]] = None - aliases: Optional[List[Alias]] = None - - -class UserSearchResultItem(BaseModel): - login: str - id: int - node_id: str - avatar_url: AnyUrl - gravatar_id: str - url: AnyUrl - html_url: AnyUrl - followers_url: AnyUrl - subscriptions_url: AnyUrl - organizations_url: AnyUrl - repos_url: AnyUrl - received_events_url: AnyUrl - type: str - score: int - following_url: str - gists_url: str - starred_url: str - events_url: str - public_repos: Optional[int] = None - public_gists: Optional[int] = None - followers: Optional[int] = None - following: Optional[int] = None - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - name: Optional[str] = None - bio: Optional[str] = None - email: Optional[EmailStr] = None - location: Optional[str] = None - site_admin: bool - hireable: Optional[bool] = None - text_matches: Optional[SearchResultTextMatches] = None - blog: Optional[str] = None - company: Optional[str] = None - suspended_at: Optional[datetime] = None - - -class Plan1(BaseModel): - collaborators: int - name: str - space: int - private_repos: int - - -class PrivateUser(BaseModel): - login: str = Field(..., example='octocat') - id: int = Field(..., example=1) - node_id: str = Field(..., example='MDQ6VXNlcjE=') - avatar_url: AnyUrl = Field( - ..., example='https://github.com/images/error/octocat_happy.gif' - ) - gravatar_id: str = Field(..., example='') - url: AnyUrl = Field(..., example='https://api.github.com/users/octocat') - html_url: AnyUrl = Field(..., example='https://github.com/octocat') - followers_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/followers' - ) - following_url: str = Field( - ..., example='https://api.github.com/users/octocat/following{/other_user}' - ) - gists_url: str = Field( - ..., example='https://api.github.com/users/octocat/gists{/gist_id}' - ) - starred_url: str = Field( - ..., example='https://api.github.com/users/octocat/starred{/owner}{/repo}' - ) - subscriptions_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/subscriptions' - ) - organizations_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/orgs' - ) - repos_url: AnyUrl = Field(..., example='https://api.github.com/users/octocat/repos') - events_url: str = Field( - ..., example='https://api.github.com/users/octocat/events{/privacy}' - ) - received_events_url: AnyUrl = Field( - ..., example='https://api.github.com/users/octocat/received_events' - ) - type: str = Field(..., example='User') - site_admin: bool - name: str = Field(..., example='monalisa octocat') - company: str = Field(..., example='GitHub') - blog: str = Field(..., example='https://github.com/blog') - location: str = Field(..., example='San Francisco') - email: EmailStr = Field(..., example='octocat@github.com') - hireable: bool - bio: str = Field(..., example='There once was...') - twitter_username: Optional[str] = Field(None, example='monalisa') - public_repos: int = Field(..., example=2) - public_gists: int = Field(..., example=1) - followers: int = Field(..., example=20) - following: int = Field(..., example=0) - created_at: datetime = Field(..., example='2008-01-14T04:33:35Z') - updated_at: datetime = Field(..., example='2008-01-14T04:33:35Z') - private_gists: int = Field(..., example=81) - total_private_repos: int = Field(..., example=100) - owned_private_repos: int = Field(..., example=100) - disk_usage: int = Field(..., example=10000) - collaborators: int = Field(..., example=8) - two_factor_authentication: bool = Field(..., example=True) - plan: Optional[Plan1] = None - suspended_at: Optional[datetime] = None - business_plus: Optional[bool] = None - ldap_dn: Optional[str] = None - - -class Plan2(BaseModel): - collaborators: int - name: str - space: int - private_repos: int - - -class PublicUser(BaseModel): - login: str - id: int - node_id: str - avatar_url: AnyUrl - gravatar_id: str - url: AnyUrl - html_url: AnyUrl - followers_url: AnyUrl - following_url: str - gists_url: str - starred_url: str - subscriptions_url: AnyUrl - organizations_url: AnyUrl - repos_url: AnyUrl - events_url: str - received_events_url: AnyUrl - type: str - site_admin: bool - name: str - company: str - blog: str - location: str - email: EmailStr - hireable: bool - bio: str - twitter_username: Optional[str] = None - public_repos: int - public_gists: int - followers: int - following: int - created_at: datetime - updated_at: datetime - plan: Optional[Plan2] = None - suspended_at: Optional[datetime] = None - private_gists: Optional[int] = Field(None, example='0') - total_private_repos: Optional[int] = Field(None, example='0') - owned_private_repos: Optional[int] = Field(None, example='0') - disk_usage: Optional[int] = Field(None, example='0') - collaborators: Optional[int] = Field(None, example='0') - - -class Subkey(BaseModel): - id: Optional[int] = None - primary_key_id: Optional[int] = None - key_id: Optional[str] = None - public_key: Optional[str] = None - emails: Optional[List] = None - subkeys: Optional[List] = None - can_sign: Optional[bool] = None - can_encrypt_comms: Optional[bool] = None - can_encrypt_storage: Optional[bool] = None - can_certify: Optional[bool] = None - created_at: Optional[str] = None - expires_at: Optional[str] = None - raw_key: Optional[str] = None - - -class GpgKey(BaseModel): - id: int = Field(..., example=3) - primary_key_id: int - key_id: str = Field(..., example='3262EFF25BA0D270') - public_key: str = Field(..., example='xsBNBFayYZ...') - emails: List[Email] = Field( - ..., - example=[{'email': 'mastahyeti@users.noreply.github.com', 'verified': True}], - ) - subkeys: List[Subkey] = Field( - ..., - example=[ - { - 'id': 4, - 'primary_key_id': 3, - 'key_id': '4A595D4C72EE49C7', - 'public_key': 'zsBNBFayYZ...', - 'emails': [], - 'subkeys': [], - 'can_sign': False, - 'can_encrypt_comms': True, - 'can_encrypt_storage': True, - 'can_certify': False, - 'created_at': '2016-03-24T11:31:04-06:00', - 'expires_at': None, - } - ], - ) - can_sign: bool = Field(..., example=True) - can_encrypt_comms: bool - can_encrypt_storage: bool - can_certify: bool = Field(..., example=True) - created_at: datetime = Field(..., example='2016-03-24T11:31:04-06:00') - expires_at: datetime - raw_key: str - - -class Key(BaseModel): - key_id: Optional[str] = None - key: Optional[str] = None - id: Optional[int] = None - url: Optional[str] = None - title: Optional[str] = None - created_at: Optional[datetime] = None - verified: Optional[bool] = None - read_only: Optional[bool] = None - - -class MarketplaceAccount(BaseModel): - url: AnyUrl - id: int - type: str - node_id: Optional[str] = None - login: str - email: Optional[EmailStr] = None - organization_billing_email: Optional[EmailStr] = None - - -class UserMarketplacePurchase(BaseModel): - billing_cycle: str = Field(..., example='monthly') - next_billing_date: datetime = Field(..., example='2017-11-11T00:00:00Z') - unit_count: int - on_free_trial: bool = Field(..., example=True) - free_trial_ends_on: datetime = Field(..., example='2017-11-11T00:00:00Z') - updated_at: datetime = Field(..., example='2017-11-02T01:12:12Z') - account: MarketplaceAccount - plan: MarketplaceListingPlan - - -class StarredRepository(BaseModel): - starred_at: datetime - repo: Repository - - -class Context(BaseModel): - message: str - octicon: str - - -class Hovercard(BaseModel): - contexts: List[Context] - - -class KeySimple(BaseModel): - id: int - key: str - -# Make sure all autogenerated Pydantic models have their forward refs updated -for local in locals().copy().values(): - if hasattr(local, "update_forward_refs"): - local.update_forward_refs()