feat: branch protection + deps caching
This commit is contained in:
+2
-2
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user