1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-15 05:35:00 +00:00

Remove unused imports

This commit is contained in:
RGBCube 2022-06-27 13:17:16 +03:00
parent 7b4b364beb
commit 859803fd72
3 changed files with 2224 additions and 1558 deletions

View file

@ -9,15 +9,13 @@ import time
from datetime import datetime, timezone
from typing import TYPE_CHECKING, Any, Awaitable, Dict, List, Literal, NamedTuple, Optional, Union
from aiohttp import ClientSession, TraceConfig, __version__ as aiohttp_version
from aiohttp import ClientSession, __version__ as aiohttp_version
from ..errors import error_from_request
from ..utils import human_readable_time_until
if TYPE_CHECKING:
from types import SimpleNamespace
from aiohttp import BasicAuth, TraceRequestEndParams, TraceRequestStartParams
from aiohttp import BasicAuth
from typing_extensions import Self
from ..objects import File

View file

@ -6,138 +6,51 @@ if TYPE_CHECKING:
from typing_extensions import NotRequired
class LicenseSimple(TypedDict):
# Example: mit
key: str
# Example: MIT License
name: str
# Format: uri
# Example: https://api.github.com/licenses/mit
url: Optional[str]
# Example: MIT
spdx_id: Optional[str]
# Example: MDc6TGljZW5zZW1pdA==
node_id: str
# Format: uri
html_url: NotRequired[str]
class SimpleUser(TypedDict):
name: NotRequired[Optional[str]]
email: NotRequired[Optional[str]]
# Example: octocat
login: str
# Example: 1
id: int
# Example: MDQ6VXNlcjE=
node_id: str
# Format: uri
# Example: https://github.com/images/error/octocat_happy.gif
avatar_url: str
# Example: 41d064eb2195891e12d0413f63227ea7
gravatar_id: Optional[str]
# Format: uri
# Example: https://api.github.com/users/octocat
url: str
# Format: uri
# Example: https://github.com/octocat
html_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/followers
followers_url: str
# Example: https://api.github.com/users/octocat/following{/other_user}
following_url: str
# Example: https://api.github.com/users/octocat/gists{/gist_id}
gists_url: str
# Example: https://api.github.com/users/octocat/starred{/owner}{/repo}
starred_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/subscriptions
subscriptions_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/orgs
organizations_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/repos
repos_url: str
# Example: https://api.github.com/users/octocat/events{/privacy}
events_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/received_events
received_events_url: str
# Example: User
type: str
site_admin: bool
# Example: "2020-07-09T00:17:55Z"
starred_at: NotRequired[str]
class Permissions(TypedDict):
admin: bool
pull: bool
triage: NotRequired[bool]
push: bool
admin: NotRequired[bool]
maintain: NotRequired[bool]
push: NotRequired[bool]
triage: NotRequired[bool]
pull: NotRequired[bool]
class SimpleUser(TypedDict):
name: NotRequired[Optional[str]]
email: NotRequired[Optional[str]]
# Example: octocat
login: str
# Example: 1
id: int
# Example: MDQ6VXNlcjE=
class LicenseSimple(TypedDict):
key: str
name: str
url: Optional[str]
spdx_id: Optional[str]
node_id: str
# Format: uri
# Example: https://github.com/images/error/octocat_happy.gif
avatar_url: str
# Example: 41d064eb2195891e12d0413f63227ea7
gravatar_id: Optional[str]
# Format: uri
# Example: https://api.github.com/users/octocat
url: str
# Format: uri
# Example: https://github.com/octocat
html_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/followers
followers_url: str
# Example: https://api.github.com/users/octocat/following{/other_user}
following_url: str
# Example: https://api.github.com/users/octocat/gists{/gist_id}
gists_url: str
# Example: https://api.github.com/users/octocat/starred{/owner}{/repo}
starred_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/subscriptions
subscriptions_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/orgs
organizations_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/repos
repos_url: str
# Example: https://api.github.com/users/octocat/events{/privacy}
events_url: str
# Format: uri
# Example: https://api.github.com/users/octocat/received_events
received_events_url: str
# Example: User
type: str
site_admin: bool
# Example: "2020-07-09T00:17:55Z"
starred_at: NotRequired[str]
html_url: NotRequired[str]
class Repository(TypedDict):
# Example: 42
id: int
# Example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5
node_id: str
# Example: Team Environment
name: str
# Example: octocat/Hello-World
full_name: str
license: Optional[LicenseSimple]
organization: NotRequired[Optional[SimpleUser]]
@ -145,166 +58,80 @@ class Repository(TypedDict):
permissions: NotRequired[Permissions]
owner: SimpleUser
private: bool
# Format: uri
# Example: https://github.com/octocat/Hello-World
html_url: str
# Example: This your first repo!
description: Optional[str]
fork: bool
# Format: uri
# Example: https://api.github.com/repos/octocat/Hello-World
url: str
# Example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
archive_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/assignees{/user}
assignees_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
blobs_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/branches{/branch}
branches_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
collaborators_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/comments{/number}
comments_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/commits{/sha}
commits_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
compare_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/contents/{+path}
contents_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/contributors
contributors_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/deployments
deployments_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/downloads
downloads_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/events
events_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/forks
forks_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
git_commits_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
git_refs_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
git_tags_url: str
# Example: git:github.com/octocat/Hello-World.git
git_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
issue_comment_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
issue_events_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/issues{/number}
issues_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
keys_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/labels{/name}
labels_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/languages
languages_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/merges
merges_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/milestones{/number}
milestones_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
notifications_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/pulls{/number}
pulls_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/releases{/id}
releases_url: str
# Example: git@github.com:octocat/Hello-World.git
ssh_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/stargazers
stargazers_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
statuses_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/subscribers
subscribers_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/subscription
subscription_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/tags
tags_url: str
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/teams
teams_url: str
# Example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
trees_url: str
# Example: https://github.com/octocat/Hello-World.git
clone_url: str
# Format: uri
# Example: git:git.example.com/octocat/Hello-World
mirror_url: Optional[str]
# Format: uri
# Example: http://api.github.com/repos/octocat/Hello-World/hooks
hooks_url: str
# Format: uri
# Example: https://svn.github.com/octocat/Hello-World
svn_url: str
# Format: uri
# Example: https://github.com
homepage: Optional[str]
language: Optional[str]
# Example: 9
forks_count: int
# Example: 80
stargazers_count: int
# Example: 80
watchers_count: int
# Example: 108
size: int
# Example: master
default_branch: str
# Example: 0
open_issues_count: int
# Example: True
is_template: NotRequired[bool]
topics: NotRequired[List[str]]
# Example: True
has_issues: bool
# Example: True
has_projects: bool
# Example: True
has_wiki: bool
has_pages: bool
# Example: True
has_downloads: bool
archived: bool
disabled: bool
visibility: NotRequired[str]
# Format: date-time
# Example: 2011-01-26T19:06:43Z
pushed_at: Optional[str]
# Format: date-time
# Example: 2011-01-26T19:01:12Z
created_at: Optional[str]
# Format: date-time
# Example: 2011-01-26T19:14:43Z
updated_at: Optional[str]
# Example: True
allow_rebase_merge: NotRequired[bool]
template_repository: NotRequired[Optional[dict]]
temp_clone_token: NotRequired[str]
# Example: True
allow_squash_merge: NotRequired[bool]
# Example: False
allow_auto_merge: NotRequired[bool]
# Example: False
delete_branch_on_merge: NotRequired[bool]
# Example: False
allow_update_branch: NotRequired[bool]
use_squash_pr_title_as_default: NotRequired[bool]
# Example: True
allow_merge_commit: NotRequired[bool]
allow_forking: NotRequired[bool]
subscribers_count: NotRequired[int]
@ -312,8 +139,103 @@ class Repository(TypedDict):
open_issues: int
watchers: int
master_branch: NotRequired[str]
# Example: "2020-07-09T00:17:42Z"
starred_at: NotRequired[str]
GeneratedObjectResult = Repository
class CodeOfConduct(TypedDict):
key: str
name: str
url: str
body: NotRequired[str]
html_url: Optional[str]
class MinimalRepository(TypedDict):
id: int
node_id: str
name: str
full_name: str
owner: SimpleUser
private: bool
html_url: str
description: Optional[str]
fork: bool
url: str
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: str
deployments_url: str
downloads_url: str
events_url: str
forks_url: str
git_commits_url: str
git_refs_url: str
git_tags_url: str
git_url: NotRequired[str]
issue_comment_url: str
issue_events_url: str
issues_url: str
keys_url: str
labels_url: str
languages_url: str
merges_url: str
milestones_url: str
notifications_url: str
pulls_url: str
releases_url: str
ssh_url: NotRequired[str]
stargazers_url: str
statuses_url: str
subscribers_url: str
subscription_url: str
tags_url: str
teams_url: str
trees_url: str
clone_url: NotRequired[str]
mirror_url: NotRequired[Optional[str]]
hooks_url: str
svn_url: NotRequired[str]
homepage: NotRequired[Optional[str]]
language: NotRequired[Optional[str]]
forks_count: NotRequired[int]
stargazers_count: NotRequired[int]
watchers_count: NotRequired[int]
size: NotRequired[int]
default_branch: NotRequired[str]
open_issues_count: NotRequired[int]
is_template: NotRequired[bool]
topics: NotRequired[List[str]]
has_issues: NotRequired[bool]
has_projects: NotRequired[bool]
has_wiki: NotRequired[bool]
has_pages: NotRequired[bool]
has_downloads: NotRequired[bool]
archived: NotRequired[bool]
disabled: NotRequired[bool]
visibility: NotRequired[str]
pushed_at: NotRequired[Optional[str]]
created_at: NotRequired[Optional[str]]
updated_at: NotRequired[Optional[str]]
permissions: NotRequired[Permissions]
role_name: NotRequired[str]
template_repository: NotRequired[Optional[Repository]]
temp_clone_token: NotRequired[str]
delete_branch_on_merge: NotRequired[bool]
subscribers_count: NotRequired[int]
network_count: NotRequired[int]
code_of_conduct: NotRequired[CodeOfConduct]
license: NotRequired[Optional[dict]]
forks: NotRequired[int]
open_issues: NotRequired[int]
watchers: NotRequired[int]
allow_forking: NotRequired[bool]
GeneratedObjectResult = List[MinimalRepository]

View file

@ -1,3 +1,595 @@
{
"type": "array",
"items": {
"title": "Minimal Repository",
"description": "Minimal Repository",
"type": "object",
"properties": {
"id": {
"type": "integer",
"examples": [
1296269
]
},
"node_id": {
"type": "string",
"examples": [
"MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
]
},
"name": {
"type": "string",
"examples": [
"Hello-World"
]
},
"full_name": {
"type": "string",
"examples": [
"octocat/Hello-World"
]
},
"owner": {
"title": "Simple User",
"description": "Simple User",
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"login": {
"type": "string",
"examples": [
"octocat"
]
},
"id": {
"type": "integer",
"examples": [
1
]
},
"node_id": {
"type": "string",
"examples": [
"MDQ6VXNlcjE="
]
},
"avatar_url": {
"type": "string",
"format": "uri",
"examples": [
"https://github.com/images/error/octocat_happy.gif"
]
},
"gravatar_id": {
"type": [
"string",
"null"
],
"examples": [
"41d064eb2195891e12d0413f63227ea7"
]
},
"url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat"
]
},
"html_url": {
"type": "string",
"format": "uri",
"examples": [
"https://github.com/octocat"
]
},
"followers_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/followers"
]
},
"following_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/following{/other_user}"
]
},
"gists_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/gists{/gist_id}"
]
},
"starred_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/starred{/owner}{/repo}"
]
},
"subscriptions_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/subscriptions"
]
},
"organizations_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/orgs"
]
},
"repos_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/repos"
]
},
"events_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/events{/privacy}"
]
},
"received_events_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/received_events"
]
},
"type": {
"type": "string",
"examples": [
"User"
]
},
"site_admin": {
"type": "boolean"
},
"starred_at": {
"type": "string",
"examples": [
"\"2020-07-09T00:17:55Z\""
]
}
},
"required": [
"avatar_url",
"events_url",
"followers_url",
"following_url",
"gists_url",
"gravatar_id",
"html_url",
"id",
"node_id",
"login",
"organizations_url",
"received_events_url",
"repos_url",
"site_admin",
"starred_url",
"subscriptions_url",
"type",
"url"
]
},
"private": {
"type": "boolean"
},
"html_url": {
"type": "string",
"format": "uri",
"examples": [
"https://github.com/octocat/Hello-World"
]
},
"description": {
"type": [
"string",
"null"
],
"examples": [
"This your first repo!"
]
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/repos/octocat/Hello-World"
]
},
"archive_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
]
},
"assignees_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
]
},
"blobs_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
]
},
"branches_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
]
},
"collaborators_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
]
},
"comments_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/comments{/number}"
]
},
"commits_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
]
},
"compare_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
]
},
"contents_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
]
},
"contributors_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/contributors"
]
},
"deployments_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/deployments"
]
},
"downloads_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/downloads"
]
},
"events_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/events"
]
},
"forks_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/forks"
]
},
"git_commits_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
]
},
"git_refs_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
]
},
"git_tags_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
]
},
"git_url": {
"type": "string"
},
"issue_comment_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
]
},
"issue_events_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
]
},
"issues_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/issues{/number}"
]
},
"keys_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
]
},
"labels_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/labels{/name}"
]
},
"languages_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/languages"
]
},
"merges_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/merges"
]
},
"milestones_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
]
},
"notifications_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
]
},
"pulls_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
]
},
"releases_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/releases{/id}"
]
},
"ssh_url": {
"type": "string"
},
"stargazers_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/stargazers"
]
},
"statuses_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
]
},
"subscribers_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/subscribers"
]
},
"subscription_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/subscription"
]
},
"tags_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/tags"
]
},
"teams_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/teams"
]
},
"trees_url": {
"type": "string",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
]
},
"clone_url": {
"type": "string"
},
"mirror_url": {
"type": [
"string",
"null"
]
},
"hooks_url": {
"type": "string",
"format": "uri",
"examples": [
"http://api.github.com/repos/octocat/Hello-World/hooks"
]
},
"svn_url": {
"type": "string"
},
"homepage": {
"type": [
"string",
"null"
]
},
"language": {
"type": [
"string",
"null"
]
},
"forks_count": {
"type": "integer"
},
"stargazers_count": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"default_branch": {
"type": "string"
},
"open_issues_count": {
"type": "integer"
},
"is_template": {
"type": "boolean"
},
"topics": {
"type": "array",
"items": {
"type": "string"
}
},
"has_issues": {
"type": "boolean"
},
"has_projects": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_pages": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"visibility": {
"type": "string"
},
"pushed_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"examples": [
"2011-01-26T19:06:43Z"
]
},
"created_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"examples": [
"2011-01-26T19:01:12Z"
]
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"examples": [
"2011-01-26T19:14:43Z"
]
},
"permissions": {
"type": "object",
"properties": {
"admin": {
"type": "boolean"
},
"maintain": {
"type": "boolean"
},
"push": {
"type": "boolean"
},
"triage": {
"type": "boolean"
},
"pull": {
"type": "boolean"
}
}
},
"role_name": {
"type": "string",
"examples": [
"admin"
]
},
"template_repository": {
"anyOf": [
{
"type": "null"
},
{
"title": "Repository",
"description": "A git repository",
@ -1380,3 +1972,157 @@
"updated_at"
]
}
]
},
"temp_clone_token": {
"type": "string"
},
"delete_branch_on_merge": {
"type": "boolean"
},
"subscribers_count": {
"type": "integer"
},
"network_count": {
"type": "integer"
},
"code_of_conduct": {
"title": "Code Of Conduct",
"description": "Code Of Conduct",
"type": "object",
"properties": {
"key": {
"type": "string",
"examples": [
"contributor_covenant"
]
},
"name": {
"type": "string",
"examples": [
"Contributor Covenant"
]
},
"url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/codes_of_conduct/contributor_covenant"
]
},
"body": {
"type": "string",
"examples": [
"# 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": {
"type": [
"string",
"null"
],
"format": "uri"
}
},
"required": [
"url",
"html_url",
"key",
"name"
]
},
"license": {
"type": [
"object",
"null"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"spdx_id": {
"type": "string"
},
"url": {
"type": "string"
},
"node_id": {
"type": "string"
}
}
},
"forks": {
"type": "integer",
"examples": [
0
]
},
"open_issues": {
"type": "integer",
"examples": [
0
]
},
"watchers": {
"type": "integer",
"examples": [
0
]
},
"allow_forking": {
"type": "boolean"
}
},
"required": [
"archive_url",
"assignees_url",
"blobs_url",
"branches_url",
"collaborators_url",
"comments_url",
"commits_url",
"compare_url",
"contents_url",
"contributors_url",
"deployments_url",
"description",
"downloads_url",
"events_url",
"fork",
"forks_url",
"full_name",
"git_commits_url",
"git_refs_url",
"git_tags_url",
"hooks_url",
"html_url",
"id",
"node_id",
"issue_comment_url",
"issue_events_url",
"issues_url",
"keys_url",
"labels_url",
"languages_url",
"merges_url",
"milestones_url",
"name",
"notifications_url",
"owner",
"private",
"pulls_url",
"releases_url",
"stargazers_url",
"statuses_url",
"subscribers_url",
"subscription_url",
"tags_url",
"teams_url",
"trees_url",
"url"
]
}
}