#17 · Add `isScoreboardConfigured()` guard and graceful fallback
Last checked with GitLab: . Status comes from GitLab using a 2-minute cache. Merge events clear affected cached statuses. An already-open page does not update itself. Refresh page.
An MR completes this bounty when it is merged into main with Closes #17 and GitLab closes the issue. A mention or an updated timestamp is not completion. Awarded points appear in Activity.
cp .dev.vars.example .dev.vars && pnpm dev, after rebasing on main) and fully test your change before opening the MR.
Description
Context
Per the bot-utils convention, every external service client should have an is*Configured() guard. SimpleX bot needs one for scoreboard so forks without a scoreboard get a clean "This server doesn't have points enabled" instead of a stack trace.
Acceptance criteria
- [ ]
isScoreboardConfigured()returns true only ifSCOREBOARD_URLandBOT_API_KEYare both set - [ ] All scoreboard-touching commands use
featureDisabled('points')when guard returns false - [ ] Doc string follows the pattern in
packages/shared-utils/src/bot-utils/
Technical hints
- Mirror an existing guard in
packages/shared-utils/src/bot-utils/(e.g.career-board-client.ts'sisCareerBoardConfigured()) - Export from
packages/shared-utils/src/bot-utils/index.tsso both bots share it
--- *Submit a merge request that says Closes #<this issue iid> in the description. On merge to main, the GitLab webhook will auto-award your bounty + the standard merge_pr (40 pts) to your scoreboard account. Email on commit must match your Authentik email.*
Relevant files
No relevant files linked yet.
Hints
No hints yet.
Activity
No points have been awarded for this bounty yet.
Comments
Sign in to join the discussion.
No comments yet. Be the first to weigh in.