From b833cdd4af61f15337828192a84296d701f829c1 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Mon, 15 Dec 2025 23:22:30 -0800 Subject: [PATCH] 0.0.141 --- entry | 6 +++--- mcp/git.ts | 1 + package.json | 2 +- utils/setup.ts | 5 ++++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/entry b/entry index 082a5cf..89363e3 100755 --- a/entry +++ b/entry @@ -83327,7 +83327,7 @@ function query({ // package.json var package_default = { name: "@pullfrog/action", - version: "0.0.140", + version: "0.0.141", type: "module", files: [ "index.js", @@ -123871,10 +123871,10 @@ function setupGit(ctx) { } catch { log.debug("No existing authentication headers to remove"); } + process.env.GH_TOKEN = githubInstallationToken2; $("git", ["config", "--local", "credential.helper", ""], { cwd: repoDir }); $("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], { - cwd: repoDir, - env: { GH_TOKEN: githubInstallationToken2 } + cwd: repoDir }); log.info("\u2713 Configured gh as credential helper"); if (payload.event.is_pr !== true || !payload.event.issue_number) { diff --git a/mcp/git.ts b/mcp/git.ts index 2cf8230..c8c9f68 100644 --- a/mcp/git.ts +++ b/mcp/git.ts @@ -7,6 +7,7 @@ import { execute, tool } from "./shared.ts"; export function CreateBranchTool(ctx: Context) { const defaultBranch = ctx.repo.default_branch || "main"; + const CreateBranch = type({ branchName: type.string.describe( "The name of the branch to create (e.g., 'pullfrog/123-fix-bug')" diff --git a/package.json b/package.json index b7fb16e..20031b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pullfrog/action", - "version": "0.0.140", + "version": "0.0.141", "type": "module", "files": [ "index.js", diff --git a/utils/setup.ts b/utils/setup.ts index d929de0..7818de1 100644 --- a/utils/setup.ts +++ b/utils/setup.ts @@ -89,11 +89,14 @@ export function setupGit(ctx: Context): SetupGitResult { log.debug("No existing authentication headers to remove"); } + // set GH_TOKEN in process.env so gh auth git-credential uses the installation token + // (not the default GITHUB_TOKEN which has different permissions) + process.env.GH_TOKEN = githubInstallationToken; + // set up gh as credential helper - this makes git use GH_TOKEN for any remote $("git", ["config", "--local", "credential.helper", ""], { cwd: repoDir }); $("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], { cwd: repoDir, - env: { GH_TOKEN: githubInstallationToken }, }); log.info("✓ Configured gh as credential helper");