• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 38391683902
67%
develop: 46%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/develop/pr-7380-74d4774766936b6e6141a58d061c3396a01c85c9
DEFAULT BRANCH: develop
Ran 13 Oct 2026 11:40AM UTC
Jobs 1
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Oct 2026 11:31AM UTC coverage: 66.737%. Remained the same
38391683902

push

github

web-flow
chore(cli): add permission building blocks for shared API calls (#7105)

## Summary

Scoped personal access tokens let a user pick exactly which permissions
a token gets, so the CLI needs to say which permissions each command
requires. This continues the mapping work from the command permission
model; see
[CLI-2474](https://linear.app/supabase/issue/CLI-2474/proposal-derive-and-document-the-management-api-scopes-each-cli).

## What's in this PR

- Reusable permission building blocks for the Management API calls made
by shared modules rather than command handlers: the DB config resolver,
project ref picker, linked-project cache, link services, storage
credentials, project API keys, upgrade suggestion, branch ref and target
lookups, the login profile lookup, and linked service versions. Many
commands reach these modules, so each is mapped once and included by the
commands that use it instead of being repeated in every declaration.
Each block lives next to the module whose calls it describes.
- An integration test per block that runs the real module and checks the
requests it makes against the block, so the mapping can't drift from the
code. Command tests replace these modules with fakes, so they wouldn't
catch it. Each best-effort call also has a 403 case showing the module's
result survives, and the drift check verifies `request.query` qualifiers
against the recorded requests.
- Model additions the blocks needed:
- `{ flag, is }` tests a switch by its effective value, so
`--skip-pooler=false` is distinguished from omitting it. A flag given an
empty value counts as absent.
- `{ dbTarget }` conditions with `withDbTarget` select on the database a
run targets: `--db-url`, then `--local`, then `--linked`, then the
command's default. The DB config block applies only on the linked
target.
- `withKind` lets a command override a block's required or best-effort
label.
- `request.query` records request details such as `reveal=true` as data.

The blocks live in sh... (continued)

4097 of 6139 relevant lines covered (66.74%)

7.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38391683902.1 13 Oct 2026 11:40AM UTC 79
66.74
GitHub Action Run
Source Files on build 38391683902
  • Tree
  • List 79
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38391683902
  • 21396b5d on github
  • Prev Build on gh-readonly-queue/develop/pr-7113-a36a396f2668673f0e849b246d614d743879d0b0 (#38390656970)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc