Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 78dcb3a2b3 |
@@ -20,11 +20,6 @@ inputs:
|
|||||||
bot-token:
|
bot-token:
|
||||||
description: API key or token for the selected bot
|
description: API key or token for the selected bot
|
||||||
required: false
|
required: false
|
||||||
model:
|
|
||||||
description: >-
|
|
||||||
Model for the selected bot. Defaults to `claude-sonnet-5` or
|
|
||||||
`gpt-5.6-terra`, the mid tiers, which cover reviews and fixes.
|
|
||||||
required: false
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -45,7 +40,6 @@ runs:
|
|||||||
ACTION_PATH: ${{ gitea.action_path }}
|
ACTION_PATH: ${{ gitea.action_path }}
|
||||||
BOT_TYPE: ${{ inputs.bot-type }}
|
BOT_TYPE: ${{ inputs.bot-type }}
|
||||||
BOT_TOKEN: ${{ inputs.bot-token }}
|
BOT_TOKEN: ${{ inputs.bot-token }}
|
||||||
MODEL: ${{ inputs.model }}
|
|
||||||
GITEA_API_URL: ${{ gitea.api_url }}
|
GITEA_API_URL: ${{ gitea.api_url }}
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
GITEA_TOKEN: ${{ inputs.author-token }}
|
GITEA_TOKEN: ${{ inputs.author-token }}
|
||||||
|
|||||||
@@ -20,13 +20,6 @@ const EVENT = env("EVENT_NAME");
|
|||||||
const AUTHOR_TOKEN = env("GITEA_TOKEN");
|
const AUTHOR_TOKEN = env("GITEA_TOKEN");
|
||||||
const REVIEWER_TOKEN = env("REVIEWER_TOKEN");
|
const REVIEWER_TOKEN = env("REVIEWER_TOKEN");
|
||||||
const RULES_PATH = "repos/commons/code-rules/raw/README.md";
|
const RULES_PATH = "repos/commons/code-rules/raw/README.md";
|
||||||
// The mid tiers: a run follows a fixed template and the project's checks.
|
|
||||||
const DEFAULT_MODELS: Record<string, string> = {
|
|
||||||
claude: "claude-sonnet-5",
|
|
||||||
codex: "gpt-5.6-terra",
|
|
||||||
};
|
|
||||||
const model = (bot: string): string =>
|
|
||||||
Deno.env.get("MODEL") || DEFAULT_MODELS[bot];
|
|
||||||
|
|
||||||
// The reviewer token is withheld so the agent cannot approve as the bot.
|
// The reviewer token is withheld so the agent cannot approve as the bot.
|
||||||
const { REVIEWER_TOKEN: _, ...agentEnv } = Deno.env.toObject();
|
const { REVIEWER_TOKEN: _, ...agentEnv } = Deno.env.toObject();
|
||||||
@@ -141,7 +134,7 @@ async function runClaude(prompt: string): Promise<string> {
|
|||||||
"--print",
|
"--print",
|
||||||
"--dangerously-skip-permissions",
|
"--dangerously-skip-permissions",
|
||||||
"--model",
|
"--model",
|
||||||
model("claude"),
|
"claude-fable-5",
|
||||||
"--output-format",
|
"--output-format",
|
||||||
"stream-json",
|
"stream-json",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
@@ -206,7 +199,7 @@ async function runCodex(prompt: string): Promise<string> {
|
|||||||
args: [
|
args: [
|
||||||
"exec",
|
"exec",
|
||||||
"--model",
|
"--model",
|
||||||
model("codex"),
|
"gpt-5.5",
|
||||||
"--dangerously-bypass-approvals-and-sandbox",
|
"--dangerously-bypass-approvals-and-sandbox",
|
||||||
"--output-last-message",
|
"--output-last-message",
|
||||||
file,
|
file,
|
||||||
|
|||||||
Reference in New Issue
Block a user