MCPcopy Create free account
hub / github.com/agent-tower/core / ensureProjectIsMutable

Function ensureProjectIsMutable

packages/server/src/services/project-guards.ts:13–28  ·  view source on GitHub ↗
(
  project: ProjectGuardInput,
  action: string
)

Source from the content-addressed store, hash-verified

11 repoDeletedAt: Date | null;
12};
13
14export function ensureProjectIsMutable(
15 project: ProjectGuardInput,
16 action: string
17): void {
18 if (!project.archivedAt) return;
19
20 if (project.repoDeletedAt) {
21 throw new ValidationError(
22 `Project "${project.name}" is archived and its local repository files were deleted. Rebind repoPath and restore it before trying to ${action}.`
23 );
24 }
25
26 throw new ValidationError(
27 `Project "${project.name}" is archived. Restore it before trying to ${action}.`
28 );
29}
30
31export function ensureProjectHasRepository(

Callers 15

updateMethod · 0.85
mergeTeamRunMembersMethod · 0.85
createMethod · 0.85
deleteMethod · 0.85
getDiffMethod · 0.85
rebaseMethod · 0.85
mergeMethod · 0.85
archiveMethod · 0.85
createMethod · 0.85
updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected