Make bot review setup self-contained
Check / deno (pull_request) Successful in 34s

This commit is contained in:
2026-09-14 16:16:36 +09:00
parent 70d71aa4fd
commit 419439baf6
2 changed files with 18 additions and 34 deletions
-15
View File
@@ -153,19 +153,6 @@ async function configureGitAuthor(): Promise<void> {
}
}
// The superpowers plugin gives the agent its skills, including the code review
// one that the prompt asks for. Both installs are idempotent on the persisted
// home.
async function installSuperpowers(bot: string): Promise<void> {
const commands = bot === "claude"
? [
["plugin", "marketplace", "add", "obra/superpowers-marketplace"],
["plugin", "install", "-y", "superpowers@superpowers-marketplace"],
]
: [["plugin", "add", "superpowers@openai-curated-remote"]];
for (const args of commands) await run(bot, args);
}
async function renderPrompt(): Promise<string> {
const comments: GiteaComment[] = await (await gitea(
REVIEWER_TOKEN,
@@ -200,7 +187,6 @@ async function runClaude(prompt: string): Promise<string> {
"Run `claude setup-token` locally and set the `bot-token` action input.",
);
}
await installSuperpowers("claude");
const claude = new Deno.Command("claude", {
args: [
"--print",
@@ -265,7 +251,6 @@ async function runCodex(prompt: string): Promise<string> {
})
.output();
if (!loggedIn.success) await codexDeviceLogin();
await installSuperpowers("codex");
const file = await Deno.makeTempFile();
const status = await new Deno.Command("codex", {
args: [