ios: don't assign builds to an all-builds beta group (#1457)
The Internal group has hasAccessToAllBuilds, so ASC 422s an explicit
assignment ('Cannot add internal group to a build') — surfaced on the first
mint to get past the upload (0.9.1). Skip such groups; they already have
every build.
Claude-Session: https://claude.ai/code/session_014mt8aQ3bwLs1kcqeP598xr
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+6
−0
ios/asc-testflight.mjs+6 −0
diff --git a/ios/asc-testflight.mjs b/ios/asc-testflight.mjs| index 73f0729..98148ce 100755 |
| --- a/ios/asc-testflight.mjs |
| +++ b/ios/asc-testflight.mjs |
| @@ -155,6 +155,12 @@ if (notesPath) { |
| // what puts the build in front of Apple's beta review. |
| for (const name of external ? ["Internal", "External Testers"] : ["Internal"]) { |
| const group = await groupNamed(name); |
| + // A group with access to all builds (our "Internal") already has this one — |
| + // ASC refuses an explicit assignment with a 422. |
| + if (group.attributes.hasAccessToAllBuilds) { |
| + console.log(`✓ "${name}" has access to all builds — nothing to add`); |
| + continue; |
| + } |
| await api(`/v1/betaGroups/${group.id}/relationships/builds`, { |
| method: "POST", |
| body: { data: [{ type: "builds", id: built.id }] }, |