-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yaml
More file actions
203 lines (199 loc) · 6.22 KB
/
openapi.yaml
File metadata and controls
203 lines (199 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
openapi: 3.0.3
info:
title: RISK RADAR API
version: "1.0.0"
servers:
- url: https://risk-radar-production.up.railway.app
paths:
/healthz:
get:
summary: Health check
operationId: healthz
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
ok: { type: boolean, example: true }
/api/scan-pr:
get:
summary: Scan PR risk signals
operationId: scanPr
parameters:
- in: query
name: owner
required: true
schema: { type: string }
description: GitHub repository owner
- in: query
name: repo
required: true
schema: { type: string }
description: GitHub repository name
- in: query
name: pr
required: true
schema: { type: integer, format: int32 }
description: Pull Request number
responses:
"200":
description: Scan result
content:
application/json:
schema:
$ref: "#/components/schemas/PRScanResponse"
/api/analyze-pr-performance:
get:
summary: Analyze PR performance impact (no benchmark)
description: >
벤치마크 없이 PR 메타데이터와 CI 신호로 성능 영향도를 추정합니다.
Query 예: ?owner=Hwang9170&repo=Copilot_ai&pr=3
operationId: analyzePrPerformance
parameters:
- in: query
name: owner
required: true
schema: { type: string }
description: GitHub repository owner
- in: query
name: repo
required: true
schema: { type: string }
description: GitHub repository name
- in: query
name: pr
required: true
schema: { type: integer, format: int32 }
description: Pull Request number
responses:
"200":
description: Analysis result
content:
application/json:
schema:
$ref: "#/components/schemas/AnalyzePRPerformanceResponse"
components:
schemas:
PRScanResponse:
type: object
properties:
owner: { type: string }
repo: { type: string }
pr: { type: integer }
title: { type: string }
state: { type: string, example: open }
base: { type: string }
draft: { type: boolean }
score: { type: integer, description: 0-100 }
grade: { type: string, example: B }
signals:
type: object
properties:
size_churn:
type: object
properties:
additions: { type: integer }
deletions: { type: integer }
points: { type: integer }
files_changed:
type: object
properties:
count: { type: integer }
points: { type: integer }
sensitive_paths:
type: object
properties:
count: { type: integer }
points: { type: integer }
secrets_in_diff:
type: object
properties:
hits: { type: integer }
points: { type: integer }
gha_unpinned_actions:
type: object
properties:
count: { type: integer }
points: { type: integer }
ci_failures:
type: object
properties:
count: { type: integer }
points: { type: integer }
reviews_changes_requested:
type: object
properties:
flag: { type: boolean }
points: { type: integer }
author_association:
type: object
properties:
value: { type: string }
points: { type: integer }
age_days:
type: object
properties:
value: { type: integer }
points: { type: integer }
AnalyzePRPerformanceResponse:
type: object
properties:
ok: { type: boolean, example: true }
pr: { type: integer }
title: { type: string }
complexity_analysis:
type: object
properties:
impact_level: { type: string, enum: [low, medium, high] }
complexity_score: { type: number, format: float }
file_impact_score: { type: number, format: float }
total_changes: { type: integer }
changed_files: { type: integer }
dependency_changes:
type: array
items:
type: object
properties:
file: { type: string }
additions: { type: integer }
deletions: { type: integer }
status: { type: string }
file_type_analysis:
type: object
properties:
source_code: { type: integer }
config: { type: integer }
documentation: { type: integer }
tests: { type: integer }
assets: { type: integer }
total_files: { type: integer }
ci_metrics:
type: object
properties:
total_duration_ms: { type: integer }
success_count: { type: integer }
failure_count: { type: integer }
total_checks: { type: integer }
avg_duration_ms: { type: integer }
performance_risk:
type: object
properties:
risk_level: { type: string, enum: [low, medium, high] }
risk_score: { type: number, format: float }
factors:
type: object
properties:
code_complexity: { type: number }
dependency_changes: { type: number }
ci_failures: { type: number }
file_volume: { type: number }
comment_markdown: { type: string }
summary:
type: object
properties:
risk_level: { type: string, enum: [low, medium, high] }
risk_score: { type: number }
recommendation: { type: string }