|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
3 | | - "title": "GitHub Audit Log Approval Entry", |
| 3 | + "title": "GitHub Workflow Approval Entry", |
4 | 4 | "type": "object", |
5 | 5 | "properties": { |
6 | | - "@timestamp": { |
7 | | - "type": "integer", |
8 | | - "description": "Timestamp in milliseconds since epoch" |
9 | | - }, |
10 | | - "_document_id": { |
11 | | - "type": "string" |
12 | | - }, |
13 | | - "action": { |
| 6 | + "user": { |
| 7 | + "type": "object", |
| 8 | + "properties": { |
| 9 | + "login": { |
| 10 | + "type": "string", |
| 11 | + "description": "GitHub username of the approver" |
| 12 | + }, |
| 13 | + "id": { |
| 14 | + "type": "integer", |
| 15 | + "description": "GitHub user ID" |
| 16 | + }, |
| 17 | + "node_id": { |
| 18 | + "type": "string" |
| 19 | + }, |
| 20 | + "avatar_url": { |
| 21 | + "type": "string" |
| 22 | + }, |
| 23 | + "gravatar_id": { |
| 24 | + "type": "string" |
| 25 | + }, |
| 26 | + "url": { |
| 27 | + "type": "string" |
| 28 | + }, |
| 29 | + "html_url": { |
| 30 | + "type": "string" |
| 31 | + }, |
| 32 | + "followers_url": { |
| 33 | + "type": "string" |
| 34 | + }, |
| 35 | + "following_url": { |
| 36 | + "type": "string" |
| 37 | + }, |
| 38 | + "gists_url": { |
| 39 | + "type": "string" |
| 40 | + }, |
| 41 | + "starred_url": { |
| 42 | + "type": "string" |
| 43 | + }, |
| 44 | + "subscriptions_url": { |
| 45 | + "type": "string" |
| 46 | + }, |
| 47 | + "organizations_url": { |
| 48 | + "type": "string" |
| 49 | + }, |
| 50 | + "repos_url": { |
| 51 | + "type": "string" |
| 52 | + }, |
| 53 | + "events_url": { |
| 54 | + "type": "string" |
| 55 | + }, |
| 56 | + "received_events_url": { |
| 57 | + "type": "string" |
| 58 | + }, |
| 59 | + "type": { |
| 60 | + "type": "string", |
| 61 | + "enum": ["User", "Bot"] |
| 62 | + }, |
| 63 | + "user_view_type": { |
| 64 | + "type": "string" |
| 65 | + }, |
| 66 | + "site_admin": { |
| 67 | + "type": "boolean" |
| 68 | + } |
| 69 | + }, |
| 70 | + "required": ["login", "id", "type"] |
| 71 | + }, |
| 72 | + "state": { |
14 | 73 | "type": "string", |
15 | | - "enum": ["workflows.approve_workflow_job"] |
16 | | - }, |
17 | | - "actor": { |
18 | | - "type": "string" |
19 | | - }, |
20 | | - "actor_id": { |
21 | | - "type": "integer" |
22 | | - }, |
23 | | - "actor_is_bot": { |
24 | | - "type": "boolean" |
| 74 | + "enum": ["approved", "rejected"], |
| 75 | + "description": "Approval state" |
25 | 76 | }, |
26 | | - "business": { |
27 | | - "type": "string" |
28 | | - }, |
29 | | - "business_id": { |
30 | | - "type": "integer" |
31 | | - }, |
32 | | - "created_at": { |
33 | | - "type": "integer", |
34 | | - "description": "Timestamp in milliseconds since epoch" |
35 | | - }, |
36 | | - "operation_type": { |
| 77 | + "comment": { |
37 | 78 | "type": "string", |
38 | | - "enum": ["modify"] |
39 | | - }, |
40 | | - "org": { |
41 | | - "type": "string" |
42 | | - }, |
43 | | - "org_id": { |
44 | | - "type": "integer" |
45 | | - }, |
46 | | - "public_repo": { |
47 | | - "type": "boolean" |
48 | | - }, |
49 | | - "repo": { |
50 | | - "type": "string" |
51 | | - }, |
52 | | - "repo_id": { |
53 | | - "type": "integer" |
54 | | - }, |
55 | | - "request_access_security_header": { |
56 | | - "type": ["string", "null"] |
57 | | - }, |
58 | | - "run_number": { |
59 | | - "type": "integer" |
60 | | - }, |
61 | | - "user_agent": { |
62 | | - "type": "string" |
63 | | - }, |
64 | | - "workflow_run_id": { |
65 | | - "type": "integer" |
| 79 | + "description": "Optional comment provided with the approval" |
| 80 | + }, |
| 81 | + "environments": { |
| 82 | + "type": "array", |
| 83 | + "items": { |
| 84 | + "type": "object", |
| 85 | + "properties": { |
| 86 | + "id": { |
| 87 | + "type": "integer", |
| 88 | + "description": "Environment ID" |
| 89 | + }, |
| 90 | + "node_id": { |
| 91 | + "type": "string" |
| 92 | + }, |
| 93 | + "name": { |
| 94 | + "type": "string", |
| 95 | + "description": "Environment name (e.g., 'Stage', 'Production')" |
| 96 | + }, |
| 97 | + "url": { |
| 98 | + "type": "string" |
| 99 | + }, |
| 100 | + "html_url": { |
| 101 | + "type": "string" |
| 102 | + }, |
| 103 | + "created_at": { |
| 104 | + "type": "string", |
| 105 | + "format": "date-time", |
| 106 | + "description": "ISO 8601 timestamp" |
| 107 | + }, |
| 108 | + "updated_at": { |
| 109 | + "type": "string", |
| 110 | + "format": "date-time", |
| 111 | + "description": "ISO 8601 timestamp" |
| 112 | + }, |
| 113 | + "can_admins_bypass": { |
| 114 | + "type": "boolean" |
| 115 | + } |
| 116 | + }, |
| 117 | + "required": ["id", "name", "created_at", "updated_at"] |
| 118 | + }, |
| 119 | + "minItems": 1 |
66 | 120 | } |
67 | 121 | }, |
68 | 122 | "required": [ |
69 | | - "@timestamp", |
70 | | - "_document_id", |
71 | | - "action", |
72 | | - "actor", |
73 | | - "actor_id", |
74 | | - "actor_is_bot", |
75 | | - "business", |
76 | | - "business_id", |
77 | | - "created_at", |
78 | | - "operation_type", |
79 | | - "org", |
80 | | - "org_id", |
81 | | - "public_repo", |
82 | | - "repo", |
83 | | - "repo_id", |
84 | | - "run_number", |
85 | | - "user_agent", |
86 | | - "workflow_run_id" |
| 123 | + "user", |
| 124 | + "state", |
| 125 | + "comment", |
| 126 | + "environments" |
87 | 127 | ] |
88 | 128 | } |
0 commit comments