feat: branch protection + deps caching

This commit is contained in:
2026-05-31 02:44:12 -05:00
parent d5d2e5b58e
commit 19671c6299
6 changed files with 40 additions and 23 deletions
+2 -2
View File
@@ -217,7 +217,7 @@ export function classifyPushError(msg: string): PushErrorKind {
const TRANSIENT_RETRY_DELAYS_MS = [2000, 5000];
export function PushBranchTool(ctx: ToolContext) {
const defaultBranch = process.env.DEFAULT_BRANCH || "main";
const defaultBranch = ctx.repo.defaultBranch;
const pushPermission = ctx.payload.push;
return tool({
@@ -643,7 +643,7 @@ const DeleteBranch = type({
export function DeleteBranchTool(ctx: ToolContext) {
const pushPermission = ctx.payload.push;
const defaultBranch = process.env.DEFAULT_BRANCH || "main";
const defaultBranch = ctx.repo.defaultBranch;
return tool({
name: "delete_branch",
+1 -1
View File
@@ -42,7 +42,7 @@ import { UploadFileTool } from "./upload.ts";
export interface ToolContext {
agentId: "ollama";
repo: { owner: string; name: string };
repo: { owner: string; name: string; defaultBranch: string };
payload: ResolvedPayload;
gitea: Gitea;
gitToken: string;