Skip to content

Commit ed078ed

Browse files
committed
1 parent a2fd1e4 commit ed078ed

File tree

2 files changed

+66
-6
lines changed

2 files changed

+66
-6
lines changed

seer/seer.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
AutofixRequest = typing_extensions.TypedDict(
1414
"AutofixRequest",
1515
{
16+
"organization_id": int,
17+
"project_id": int,
18+
"repos": typing.List["RepoDefinition"],
19+
"base_commit_sha": typing.Union[str, None],
1620
"issue": "IssueDetails",
17-
"base_commit_sha": str,
1821
"additional_context": typing.Union[str, None],
1922
},
2023
total=False,
@@ -116,6 +119,16 @@
116119
total=False,
117120
)
118121

122+
RepoDefinition = typing_extensions.TypedDict(
123+
"RepoDefinition",
124+
{
125+
"provider": typing.Literal["github"],
126+
"owner": str,
127+
"name": str,
128+
},
129+
total=False,
130+
)
131+
119132
SentryEvent = typing_extensions.TypedDict(
120133
"SentryEvent",
121134
{

seer/seer_api.json

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,35 @@
144144
},
145145
"AutofixRequest": {
146146
"properties": {
147-
"issue": {
148-
"$ref": "#/components/schemas/IssueDetails"
147+
"organization_id": {
148+
"type": "integer",
149+
"title": "Organization Id"
150+
},
151+
"project_id": {
152+
"type": "integer",
153+
"title": "Project Id"
154+
},
155+
"repos": {
156+
"items": {
157+
"$ref": "#/components/schemas/RepoDefinition"
158+
},
159+
"type": "array",
160+
"title": "Repos"
149161
},
150162
"base_commit_sha": {
151-
"type": "string",
163+
"anyOf": [
164+
{
165+
"type": "string"
166+
},
167+
{
168+
"type": "null"
169+
}
170+
],
152171
"title": "Base Commit Sha"
153172
},
173+
"issue": {
174+
"$ref": "#/components/schemas/IssueDetails"
175+
},
154176
"additional_context": {
155177
"anyOf": [
156178
{
@@ -165,8 +187,10 @@
165187
},
166188
"type": "object",
167189
"required": [
168-
"issue",
169-
"base_commit_sha"
190+
"organization_id",
191+
"project_id",
192+
"repos",
193+
"issue"
170194
],
171195
"title": "AutofixRequest"
172196
},
@@ -469,6 +493,29 @@
469493
],
470494
"title": "IssueDetails"
471495
},
496+
"RepoDefinition": {
497+
"properties": {
498+
"provider": {
499+
"const": "github",
500+
"title": "Provider"
501+
},
502+
"owner": {
503+
"type": "string",
504+
"title": "Owner"
505+
},
506+
"name": {
507+
"type": "string",
508+
"title": "Name"
509+
}
510+
},
511+
"type": "object",
512+
"required": [
513+
"provider",
514+
"owner",
515+
"name"
516+
],
517+
"title": "RepoDefinition"
518+
},
472519
"SentryEvent": {
473520
"properties": {
474521
"entries": {

0 commit comments

Comments
 (0)