Skip to content

writeRepoRoles

writeRepoRoles(repoPath, roles, defaultBranch): void

Defined in: src/repo-roles.ts:173

Write .shepherd/roles.json and push it to the repo’s default branch WITHOUT touching the working tree (the checkout usually sits on a feature branch). The commit is built via plumbing on a temp index and pushed straight to the remote default ref, so the user’s branch/working tree is never disturbed. Throws on push rejection (protected branch / non-fast-forward / no auth) — the caller surfaces that to the dialog. On success the cache is set so the new value is read back immediately.

string

RepoRoles

string

void