Skip to content

Commit eb33f8e

Browse files
chore(launchpad): Include appid and appname in update endpoint (#95583)
followup for #95383
1 parent 8b910ce commit eb33f8e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def validate_preprod_artifact_update_schema(request_body: bytes) -> tuple[dict,
3030
"build_number": {"type": "integer"},
3131
"error_code": {"type": "integer", "minimum": 0, "maximum": 3},
3232
"error_message": {"type": "string"},
33+
"app_id": {"type": "string", "maxLength": 255},
34+
"app_name": {"type": "string", "maxLength": 255},
3335
"apple_app_info": {
3436
"type": "object",
3537
"properties": {
@@ -51,6 +53,8 @@ def validate_preprod_artifact_update_schema(request_body: bytes) -> tuple[dict,
5153
"error_message": "The error_message field must be a string.",
5254
"build_version": "The build_version field must be a string with a maximum length of 255 characters.",
5355
"build_number": "The build_number field must be an integer.",
56+
"app_id": "The app_id field must be a string with a maximum length of 255 characters.",
57+
"app_name": "The app_name field must be a string with a maximum length of 255 characters.",
5458
"apple_app_info": "The apple_app_info field must be an object.",
5559
"apple_app_info.is_simulator": "The is_simulator field must be a boolean.",
5660
"apple_app_info.codesigning_type": "The codesigning_type field must be a string.",
@@ -158,6 +162,14 @@ def put(self, request: Request, project, artifact_id) -> Response:
158162
preprod_artifact.build_number = data["build_number"]
159163
updated_fields.append("build_number")
160164

165+
if "app_id" in data:
166+
preprod_artifact.app_id = data["app_id"]
167+
updated_fields.append("app_id")
168+
169+
if "app_name" in data:
170+
preprod_artifact.app_name = data["app_name"]
171+
updated_fields.append("app_name")
172+
161173
if "apple_app_info" in data:
162174
apple_info = data["apple_app_info"]
163175
parsed_apple_info = {}

0 commit comments

Comments
 (0)