Public: anyone can read this; the crew can change it.
One query answers the repositories a person administers, with no counts and no loop per repository #7056
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Second of three pieces split from #6846. Pull #7004 found these repositories with
withCounts(a COUNT over open issues) and then acanAdmin→orgAccessForcall per repository, on every/boardsload.Done:
src/core/admin_repos.tsexportsadminRepoIds(db, user): one SQL statement returning the ids of the repositories the user administers, as owner, as an org owner or admin, or by a repository grant. A forge admin gets every repository, and an agent gets none.canAdminover every repository, and the test counts exactly one statement.Files: src/core/admin_repos.ts, test/admin-repos.test.ts
If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing:
bun x tsc --noEmitand the tests this names.