diff --git a/scripts/src/agentrun-manifests.ts b/scripts/src/agentrun-manifests.ts index 09f71db0..fab3a575 100644 --- a/scripts/src/agentrun-manifests.ts +++ b/scripts/src/agentrun-manifests.ts @@ -281,7 +281,7 @@ function agentRunBuildPublishTask(spec: AgentRunLaneSpec): Record { }; } +function agentRunPacGiteaSecretName(spec: AgentRunLaneSpec): string { + const consumerId = spec.ci.pipelineRunPrefix.replace(/-ci$/u, ""); + if (consumerId === spec.ci.pipelineRunPrefix) throw new Error(`config/agentrun.yaml controlPlane.lanes.${spec.lane}.ci.pipelineRunPrefix must end with -ci`); + return `pac-gitea-${consumerId}`; +} + function yaml(value: unknown): string { return `${Bun.YAML.stringify(value).trim()}\n`; }