Skip to content

Commit

Permalink
fix: adjust GitHubOrg interface
Browse files Browse the repository at this point in the history
It's the values from the `/users/{user}` REST endpoint
  • Loading branch information
wolfy1339 committed Feb 21, 2021
1 parent 5fb574f commit 585b06d
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,20 @@
"login": "github",
"id": 9919,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
"description": "How people build software.",
"name": "GitHub",
"company": null,
"blog": "https://github.com/about",
"location": "San Francisco, CA",
"email": null,
"twitter_username": null,
"is_verified": true,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 371,
"public_gists": 0,
"followers": 0,
"following": 0,
"gravatar_id": "",
"url": "https://api.github.com/users/github",
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
"followers_url": "https://api.github.com/users/github/followers",
"following_url": "https://api.github.com/users/github/following{/other_user}",
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
"organizations_url": "https://api.github.com/users/github/orgs",
"repos_url": "https://api.github.com/users/github/repos",
"events_url": "https://api.github.com/users/github/events{/privacy}",
"received_events_url": "https://api.github.com/users/github/received_events",
"type": "Organization",
"site_admin": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,31 +142,20 @@
"login": "github",
"id": 9919,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
"description": "How people build software.",
"name": "GitHub",
"company": null,
"blog": "https://github.com/about",
"location": "San Francisco, CA",
"email": null,
"twitter_username": null,
"is_verified": true,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 371,
"public_gists": 0,
"followers": 0,
"following": 0,
"gravatar_id": "",
"url": "https://api.github.com/users/github",
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
"followers_url": "https://api.github.com/users/github/followers",
"following_url": "https://api.github.com/users/github/following{/other_user}",
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
"organizations_url": "https://api.github.com/users/github/orgs",
"repos_url": "https://api.github.com/users/github/repos",
"events_url": "https://api.github.com/users/github/events{/privacy}",
"received_events_url": "https://api.github.com/users/github/received_events",
"type": "Organization",
"site_admin": false
}
}
132 changes: 60 additions & 72 deletions payload-schemas/schemas/common/github-org.schema.json
Original file line number Diff line number Diff line change
@@ -1,108 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "common/github-org.schema.json",
"type": "object",
"required": [
"login",
"id",
"node_id",
"avatar_url",
"gravatar_id",
"url",
"html_url",
"followers_url",
"following_url",
"gists_url",
"starred_url",
"subscriptions_url",
"organizations_url",
"repos_url",
"events_url",
"hooks_url",
"issues_url",
"members_url",
"public_members_url",
"avatar_url",
"description",
"name",
"company",
"blog",
"location",
"email",
"twitter_username",
"is_verified",
"has_organization_projects",
"has_repository_projects",
"public_repos",
"public_gists",
"followers",
"following",
"html_url",
"created_at",
"updated_at",
"type"
"received_events_url",
"type",
"site_admin"
],
"type": "object",
"properties": {
"login": { "type": "string", "enum": ["github"] },
"id": { "type": "integer", "enum": [9919] },
"node_id": { "type": "string", "enum": ["MDEyOk9yZ2FuaXphdGlvbjk5MTk="] },
"login": { "type": "string", "const": "github" },
"id": { "type": "integer", "const": 9919 },
"node_id": { "type": "string", "const": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=" },
"name": { "type": "string", "const": "GitHub" },
"email": { "type": "null" },
"avatar_url": {
"type": "string",
"format": "uri",
"const": "https://avatars.githubusercontent.com/u/9919?v=4"
},
"gravatar_id": { "type": "string", "const": "" },
"url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github"],
"format": "uri"
"format": "uri",
"const": "https://api.github.com/users/github"
},
"repos_url": {
"html_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/repos"],
"format": "uri"
"format": "uri",
"const": "https://github.com/github"
},
"events_url": {
"followers_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/events"],
"format": "uri"
"format": "uri",
"const": "https://api.github.com/users/github/followers"
},
"hooks_url": {
"following_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/hooks"],
"format": "uri"
"format": "uri-template",
"const": "https://api.github.com/users/github/following{/other_user}"
},
"issues_url": {
"gists_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/issues"],
"format": "uri"
"format": "uri-template",
"const": "https://api.github.com/users/github/gists{/gist_id}"
},
"members_url": {
"starred_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/members{/member}"],
"format": "uri-template"
"format": "uri-template",
"const": "https://api.github.com/users/github/starred{/owner}{/repo}"
},
"public_members_url": {
"subscriptions_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/public_members{/member}"],
"format": "uri-template"
"format": "uri",
"const": "https://api.github.com/users/github/subscriptions"
},
"avatar_url": {
"organizations_url": {
"type": "string",
"enum": ["https://avatars.githubusercontent.com/u/9919?v=4"],
"format": "uri"
"format": "uri",
"const": "https://api.github.com/users/github/orgs"
},
"description": { "type": "string", "enum": ["How people build software."] },
"name": { "type": "string", "enum": ["GitHub"] },
"company": { "type": ["string", "null"], "enum": [null] },
"blog": {
"repos_url": {
"type": "string",
"enum": ["https://github.com/about"],
"format": "uri"
"format": "uri",
"const": "https://api.github.com/users/github/repos"
},
"location": { "type": "string", "enum": ["San Francisco, CA"] },
"email": { "type": ["string", "null"], "enum": [null] },
"twitter_username": { "type": ["string", "null"], "enum": [null] },
"is_verified": { "type": "boolean", "enum": [true] },
"has_organization_projects": { "type": "boolean", "enum": [true] },
"has_repository_projects": { "type": "boolean", "enum": [true] },
"public_repos": { "type": "integer" },
"public_gists": { "type": "integer" },
"followers": { "type": "integer" },
"following": { "type": "integer" },
"html_url": {
"events_url": {
"type": "string",
"format": "uri-template",
"const": "https://api.github.com/users/github/events{/privacy}"
},
"received_events_url": {
"type": "string",
"enum": ["https://github.com/github"],
"format": "uri"
"format": "uri",
"const": "https://api.github.com/users/github/received_events"
},
"created_at": { "type": "string", "enum": ["2008-05-11T04:37:31Z"] },
"updated_at": { "type": "string" },
"type": { "type": "string", "enum": ["Organization"] }
"type": { "type": "string", "const": "Organization" },
"site_admin": { "type": "boolean", "const": false }
},
"additionalProperties": false,
"title": "GitHub Org"
Expand Down

0 comments on commit 585b06d

Please sign in to comment.