Skip to content

Commit 09447ea

Browse files
committed
fix(slack): complete setup remediation
1 parent 289b6bd commit 09447ea

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎packages/sim-setup/src/checks.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('setup coherence checks', () => {
4242
status: 'fail',
4343
message:
4444
'SLACK_EXTENDED_SCOPES is on but SLACK_SIGNING_SECRET is not set — native Slack triggers will fail at runtime',
45-
fix: 'set SLACK_SIGNING_SECRET or remove SLACK_EXTENDED_SCOPES',
45+
fix: 'set SLACK_SIGNING_SECRET or remove SLACK_EXTENDED_SCOPES and NEXT_PUBLIC_SLACK_EXTENDED_SCOPES',
4646
})
4747
})
4848

‎packages/sim-setup/src/checks.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,12 @@ function checkCoherence(ctx: CheckContext): Finding[] {
461461
})
462462
}
463463

464-
const featureRules: Array<{ flag: string; needs: string[]; label: string }> = [
464+
const featureRules: Array<{
465+
flag: string
466+
needs: string[]
467+
label: string
468+
disableFields?: string[]
469+
}> = [
465470
{
466471
flag: 'BILLING_ENABLED',
467472
needs: ['STRIPE_SECRET_KEY'],
@@ -471,6 +476,7 @@ function checkCoherence(ctx: CheckContext): Finding[] {
471476
flag: 'SLACK_EXTENDED_SCOPES',
472477
needs: ['SLACK_SIGNING_SECRET'],
473478
label: 'native Slack triggers',
479+
disableFields: ['SLACK_EXTENDED_SCOPES', 'NEXT_PUBLIC_SLACK_EXTENDED_SCOPES'],
474480
},
475481
{ flag: 'SSO_ENABLED', needs: ['SSO_ISSUER'], label: 'SSO' },
476482
]
@@ -482,7 +488,7 @@ function checkCoherence(ctx: CheckContext): Finding[] {
482488
group: 'coherence',
483489
status: 'fail',
484490
message: `${rule.flag} is on but ${missing.join(', ')} is not set — ${rule.label} will fail at runtime`,
485-
fix: `set ${missing.join(', ')} or remove ${rule.flag}`,
491+
fix: `set ${missing.join(', ')} or remove ${(rule.disableFields ?? [rule.flag]).join(' and ')}`,
486492
})
487493
}
488494
}

0 commit comments

Comments
 (0)