Add issue resolution confirmation workflow
Magent CI/CD / verify (push) Successful in 10m35s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 12s

This commit is contained in:
2026-09-01 11:40:43 +12:00
parent 393b8c2a88
commit 2adbed7259
14 changed files with 1155 additions and 9 deletions
+23
View File
@@ -234,6 +234,9 @@ SETTING_KEYS: List[str] = [
"requests_cleanup_time",
"requests_cleanup_days",
"requests_data_source",
"issue_confirmation_contact_attempts",
"issue_confirmation_interval_value",
"issue_confirmation_interval_unit",
"site_banner_enabled",
"site_banner_message",
"site_banner_tone",
@@ -661,6 +664,26 @@ async def update_settings(payload: Dict[str, Any]) -> Dict[str, Any]:
changed_keys.append(key)
continue
value_to_store = str(value).strip() if isinstance(value, str) else str(value)
if key == "issue_confirmation_contact_attempts":
try:
attempts = int(value_to_store)
except (TypeError, ValueError) as exc:
raise HTTPException(status_code=400, detail="Confirmation contacts must be a whole number from 0 to 10") from exc
if attempts < 0 or attempts > 10:
raise HTTPException(status_code=400, detail="Confirmation contacts must be from 0 to 10")
value_to_store = str(attempts)
if key == "issue_confirmation_interval_value":
try:
interval_value = int(value_to_store)
except (TypeError, ValueError) as exc:
raise HTTPException(status_code=400, detail="Confirmation interval must be a whole number") from exc
if interval_value < 1 or interval_value > 365:
raise HTTPException(status_code=400, detail="Confirmation interval must be from 1 to 365")
value_to_store = str(interval_value)
if key == "issue_confirmation_interval_unit":
value_to_store = value_to_store.lower()
if value_to_store not in {"days", "weeks", "months"}:
raise HTTPException(status_code=400, detail="Confirmation interval unit must be days, weeks, or months")
if key in URL_SETTING_KEYS and value_to_store:
try:
value_to_store = _normalize_service_url(value_to_store)