play: old testing builds below production listed with their replace command (status, validate); 'Not live yet' instead of 'In review'; commit redone without changesNotSentForReview on the auto-send 400; pitfalls #129

This commit is contained in:
CRTkafa 2026-11-08 02:18:24 +07:00
parent 83d351cf42
commit 9c001d1ca9
13 changed files with 130 additions and 15 deletions

View file

@ -25,6 +25,14 @@ export function isReviewRefused(err: unknown): boolean {
return reasons.every(r => /badRequest|invalid|failedPrecondition|precondition/i.test(r));
}
/** The opposite 400: with managed publishing off Play refuses changesNotSentForReview=true (live: "Changes are sent for
* review automatically"); the commit is redone without it. "cannot be sent ... automatically" is the other refusal. */
export function isAutoSendOnly(err: unknown): boolean {
const s = String(err instanceof Error ? err.message : err);
const m = /-> 400 (.*)$/s.exec(s);
return !!m && /are sent for review automatically/i.test(m[1]!);
}
/** The query string with changesNotSentForReview=true added to `base` ("?a=1" or ''). */
export function withNotSent(base: string | undefined, on: boolean): string {
const parts = [(base ?? '').replace(/^\?/, ''), on ? 'changesNotSentForReview=true' : ''].filter(Boolean);