Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b833cdd4af |
@@ -83327,7 +83327,7 @@ function query({
|
|||||||
// package.json
|
// package.json
|
||||||
var package_default = {
|
var package_default = {
|
||||||
name: "@pullfrog/action",
|
name: "@pullfrog/action",
|
||||||
version: "0.0.140",
|
version: "0.0.141",
|
||||||
type: "module",
|
type: "module",
|
||||||
files: [
|
files: [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -123871,10 +123871,10 @@ function setupGit(ctx) {
|
|||||||
} catch {
|
} catch {
|
||||||
log.debug("No existing authentication headers to remove");
|
log.debug("No existing authentication headers to remove");
|
||||||
}
|
}
|
||||||
|
process.env.GH_TOKEN = githubInstallationToken2;
|
||||||
$("git", ["config", "--local", "credential.helper", ""], { cwd: repoDir });
|
$("git", ["config", "--local", "credential.helper", ""], { cwd: repoDir });
|
||||||
$("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], {
|
$("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], {
|
||||||
cwd: repoDir,
|
cwd: repoDir
|
||||||
env: { GH_TOKEN: githubInstallationToken2 }
|
|
||||||
});
|
});
|
||||||
log.info("\u2713 Configured gh as credential helper");
|
log.info("\u2713 Configured gh as credential helper");
|
||||||
if (payload.event.is_pr !== true || !payload.event.issue_number) {
|
if (payload.event.is_pr !== true || !payload.event.issue_number) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { execute, tool } from "./shared.ts";
|
|||||||
|
|
||||||
export function CreateBranchTool(ctx: Context) {
|
export function CreateBranchTool(ctx: Context) {
|
||||||
const defaultBranch = ctx.repo.default_branch || "main";
|
const defaultBranch = ctx.repo.default_branch || "main";
|
||||||
|
|
||||||
const CreateBranch = type({
|
const CreateBranch = type({
|
||||||
branchName: type.string.describe(
|
branchName: type.string.describe(
|
||||||
"The name of the branch to create (e.g., 'pullfrog/123-fix-bug')"
|
"The name of the branch to create (e.g., 'pullfrog/123-fix-bug')"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.140",
|
"version": "0.0.141",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
+4
-1
@@ -89,11 +89,14 @@ export function setupGit(ctx: Context): SetupGitResult {
|
|||||||
log.debug("No existing authentication headers to remove");
|
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
|
// 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", "credential.helper", ""], { cwd: repoDir });
|
||||||
$("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], {
|
$("git", ["config", "--local", "--add", "credential.helper", "!gh auth git-credential"], {
|
||||||
cwd: repoDir,
|
cwd: repoDir,
|
||||||
env: { GH_TOKEN: githubInstallationToken },
|
|
||||||
});
|
});
|
||||||
log.info("✓ Configured gh as credential helper");
|
log.info("✓ Configured gh as credential helper");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user