Skip to content

Commit

Permalink
feat: use the Github org values for CodeScanningAlert (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored Feb 15, 2021
1 parent a3f0f27 commit 6a8fec1
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 80 deletions.
94 changes: 58 additions & 36 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4848,24 +4848,35 @@
"description": ""
},
"sender": {
"login": "Codertocat",
"id": 21031067,
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Codertocat",
"html_url": "https://github.com/Codertocat",
"followers_url": "https://api.github.com/users/Codertocat/followers",
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
"repos_url": "https://api.github.com/users/Codertocat/repos",
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
"type": "User",
"site_admin": false
"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,
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
}
},
{
Expand Down Expand Up @@ -5012,24 +5023,35 @@
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMQ=="
},
"sender": {
"login": "Codertocat",
"id": 21031067,
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Codertocat",
"html_url": "https://github.com/Codertocat",
"followers_url": "https://api.github.com/users/Codertocat/followers",
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
"repos_url": "https://api.github.com/users/Codertocat/repos",
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
"type": "User",
"site_admin": false
"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,
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,34 @@
"description": ""
},
"sender": {
"login": "Codertocat",
"id": 21031067,
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Codertocat",
"html_url": "https://github.com/Codertocat",
"followers_url": "https://api.github.com/users/Codertocat/followers",
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
"repos_url": "https://api.github.com/users/Codertocat/repos",
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
"type": "User",
"site_admin": false
"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,
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,34 @@
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMQ=="
},
"sender": {
"login": "Codertocat",
"id": 21031067,
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
"avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Codertocat",
"html_url": "https://github.com/Codertocat",
"followers_url": "https://api.github.com/users/Codertocat/followers",
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
"repos_url": "https://api.github.com/users/Codertocat/repos",
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
"type": "User",
"site_admin": false
"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,
"html_url": "https://github.com/github",
"created_at": "2008-05-11T04:37:31Z",
"updated_at": "2020-09-28T06:15:10Z",
"type": "Organization"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
"commit_oid": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"sender": { "$ref": "common/github-org.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
},
"commit_oid": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"sender": { "$ref": "common/github-org.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
"commit_oid": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"sender": { "$ref": "common/github-org.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
},
"commit_oid": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"sender": { "$ref": "common/github-org.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" }
},
Expand Down
90 changes: 90 additions & 0 deletions payload-schemas/schemas/common/github-org.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "common/github-org.schema.json",
"required": [
"login",
"id",
"node_id",
"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"
],
"type": "object",
"properties": {
"login": { "type": "string", "enum": ["github"] },
"id": { "type": "integer", "enum": [9919] },
"node_id": { "type": "string", "enum": ["MDEyOk9yZ2FuaXphdGlvbjk5MTk="] },
"url": { "type": "string", "enum": ["https://api.github.com/orgs/github"] },
"repos_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/repos"]
},
"events_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/events"]
},
"hooks_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/hooks"]
},
"issues_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/issues"]
},
"members_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/members{/member}"]
},
"public_members_url": {
"type": "string",
"enum": ["https://api.github.com/orgs/github/public_members{/member}"]
},
"avatar_url": {
"type": "string",
"enum": ["https://avatars.githubusercontent.com/u/9919?v=4"]
},
"description": { "type": "string", "enum": ["How people build software."] },
"name": { "type": "string", "enum": ["GitHub"] },
"company": { "type": ["string", "null"], "enum": [null] },
"blog": { "type": "string", "enum": ["https://github.com/about"] },
"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": { "type": "string", "enum": ["https://github.com/github"] },
"created_at": { "type": "string", "enum": ["2008-05-11T04:37:31Z"] },
"updated_at": { "type": "string" },
"type": { "type": "string", "enum": ["Organization"] }
},
"additionalProperties": false,
"title": "GitHub Org"
}
Loading

0 comments on commit 6a8fec1

Please sign in to comment.