Archived
remove olixero branding
This commit is contained in:
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "olixero-agent-server",
|
||||
"name": "gitea-agent-server",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "olixero-agent-server",
|
||||
"name": "gitea-agent-server",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@opencode-ai/sdk": "1.17.18"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "olixero-agent-server",
|
||||
"name": "gitea-agent-server",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
|
||||
@@ -139,15 +139,15 @@ export async function commitAndPush(input: {
|
||||
subprocessOptions(input.workspace, input, {
|
||||
env: {
|
||||
GIT_AUTHOR_NAME:
|
||||
process.env.CI_AGENT_GIT_NAME || "Olixero CI Agent",
|
||||
process.env.CI_AGENT_GIT_NAME || "Gitea Agent",
|
||||
GIT_AUTHOR_EMAIL:
|
||||
process.env.CI_AGENT_GIT_EMAIL ||
|
||||
"ci-agent@olixero.local",
|
||||
"gitea-agent@localhost",
|
||||
GIT_COMMITTER_NAME:
|
||||
process.env.CI_AGENT_GIT_NAME || "Olixero CI Agent",
|
||||
process.env.CI_AGENT_GIT_NAME || "Gitea Agent",
|
||||
GIT_COMMITTER_EMAIL:
|
||||
process.env.CI_AGENT_GIT_EMAIL ||
|
||||
"ci-agent@olixero.local",
|
||||
"gitea-agent@localhost",
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -82,7 +82,7 @@ export function findAcceptedPlan(
|
||||
const header = "## Accepted implementation plan\n\n";
|
||||
const start = selected.comment.body.indexOf(header);
|
||||
const end = selected.comment.body.lastIndexOf(
|
||||
"\n\n<!-- olixero-ci-agent:plan-footer -->",
|
||||
"\n\n<!-- gitea-agent:plan-footer -->",
|
||||
);
|
||||
if (start < 0) return undefined;
|
||||
const markdown = selected.comment.body
|
||||
|
||||
@@ -23,7 +23,7 @@ async function main(): Promise<void> {
|
||||
const botLogin = requireEnv("CI_AGENT_BOT_LOGIN");
|
||||
const policy = actorPolicy();
|
||||
const store = new AgentStore(
|
||||
process.env.AGENT_DB_PATH || "/var/lib/olixero-agent/agent.db",
|
||||
process.env.AGENT_DB_PATH || "/var/lib/gitea-agent/agent.db",
|
||||
);
|
||||
const owner = `controller-${randomUUID()}`;
|
||||
if (!store.acquireServiceLock("controller", owner, 30_000))
|
||||
|
||||
@@ -21,9 +21,9 @@ async function main(): Promise<void> {
|
||||
const readToken = await readSecret("GITEA_READ_TOKEN");
|
||||
const botLogin = requireEnv("CI_AGENT_BOT_LOGIN");
|
||||
const workspaceRoot =
|
||||
process.env.AGENT_WORKSPACE_ROOT || "/var/lib/olixero-agent/workspaces";
|
||||
process.env.AGENT_WORKSPACE_ROOT || "/var/lib/gitea-agent/workspaces";
|
||||
const store = new AgentStore(
|
||||
process.env.AGENT_DB_PATH || "/var/lib/olixero-agent/agent.db",
|
||||
process.env.AGENT_DB_PATH || "/var/lib/gitea-agent/agent.db",
|
||||
);
|
||||
const worker = `executor-${randomUUID()}`;
|
||||
process.env.GITEA_READ_TOKEN = readToken;
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function publishPlan(
|
||||
baseSha: plan.baseSha,
|
||||
planDigest: plan.planDigest,
|
||||
};
|
||||
const body = `${marker(planMarker)}\n## Accepted implementation plan\n\n${plan.markdown}\n\n<!-- olixero-ci-agent:plan-footer -->\n\n**Summary:** ${plan.summary}\n\nBase: \`${plan.baseSha.slice(0, 12)}\` | Review iterations: ${plan.iterations} | Plan digest: \`${plan.planDigest.slice(0, 12)}\``;
|
||||
const body = `${marker(planMarker)}\n## Accepted implementation plan\n\n${plan.markdown}\n\n<!-- gitea-agent:plan-footer -->\n\n**Summary:** ${plan.summary}\n\nBase: \`${plan.baseSha.slice(0, 12)}\` | Review iterations: ${plan.iterations} | Plan digest: \`${plan.planDigest.slice(0, 12)}\``;
|
||||
const comment = await context.client.upsertMarkedComment(
|
||||
job.issueNumber,
|
||||
context.botLogin,
|
||||
|
||||
@@ -94,14 +94,14 @@ export function sha256(value: string): string {
|
||||
}
|
||||
|
||||
export function marker(value: Marker): string {
|
||||
return `<!-- olixero-ci-agent:${JSON.stringify(value)} -->`;
|
||||
return `<!-- gitea-agent:${JSON.stringify(value)} -->`;
|
||||
}
|
||||
|
||||
export function parseMarker(
|
||||
body: string,
|
||||
kind?: Marker["kind"],
|
||||
): Marker | undefined {
|
||||
const match = body.match(/<!-- olixero-ci-agent:(\{[^\n]*\}) -->/);
|
||||
const match = body.match(/<!-- gitea-agent:(\{[^\n]*\}) -->/);
|
||||
if (!match?.[1]) return undefined;
|
||||
try {
|
||||
const value = JSON.parse(match[1]) as Marker;
|
||||
|
||||
@@ -122,7 +122,7 @@ test("accepted plan content must match its marker digest", () => {
|
||||
issueDigest: "issue",
|
||||
baseSha: "base",
|
||||
planDigest: sha256(markdown),
|
||||
})}\n## Accepted implementation plan\n\n${markdown}\n\n<!-- olixero-ci-agent:plan-footer -->`;
|
||||
})}\n## Accepted implementation plan\n\n${markdown}\n\n<!-- gitea-agent:plan-footer -->`;
|
||||
const comment: GiteaComment = {
|
||||
id: 1,
|
||||
body,
|
||||
|
||||
Reference in New Issue
Block a user