fix(mobile): handle base_not_on_remote in PR-create block message (#8676)

#8651 added 'base_not_on_remote' to HostedReviewCreationBlockedReason but
did not add a matching case to getMobilePrCreateBlockMessage, leaving the
switch non-exhaustive so the function can fall through and implicitly
return undefined against its string | null type. That fails `tsc` on main
(verify does not run on direct pushes, so it surfaced on PR merge commits).
Add the missing case with actionable copy consistent with the desktop
create-time message.
This commit is contained in:
Brennan Benson 2026-07-13 22:53:05 -07:00 committed by GitHub
parent 8ac6d79abf
commit e53a0a0158
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,8 @@ export function getMobilePrCreateBlockMessage(prefill: MobilePrPrefill): string
return `A ${copy.reviewLabel} already exists for this branch.`
case 'fork_head_unsupported':
return `Creating a ${copy.reviewLabel} from this fork is not supported.`
case 'base_not_on_remote':
return `Push the base branch before creating a ${copy.reviewLabel}.`
case 'needs_push':
case null:
case undefined: