Fix repo slug

This commit is contained in:
Colin McDonnell
2026-01-14 01:44:30 +00:00
committed by pullfrog[bot]
parent 5604cf1868
commit 3fa309853b
16 changed files with 278033 additions and 58 deletions
+2 -18
View File
@@ -1,34 +1,18 @@
#!/usr/bin/env node
/**
* Entry point for GitHub Action
* entry point for pullfrog/pullfrog - main action
*/
import * as core from "@actions/core";
import { resolve, isAbsolute } from "path";
import { Inputs, main } from "./main.ts";
import { log } from "./utils/cli.ts";
async function run(): Promise<void> {
// Change to cwd input or GITHUB_WORKSPACE (where actions/checkout puts the repo)
// JavaScript actions run from the action's directory, not the checked out repo
const cwdInput = core.getInput("cwd");
let cwd = cwdInput || process.env.GITHUB_WORKSPACE;
// resolve relative paths against GITHUB_WORKSPACE
if (cwdInput && !isAbsolute(cwdInput) && process.env.GITHUB_WORKSPACE) {
cwd = resolve(process.env.GITHUB_WORKSPACE, cwdInput);
}
if (cwd && process.cwd() !== cwd) {
log.debug(`changing to working directory: ${cwd}`);
process.chdir(cwd);
}
try {
const inputs = Inputs.assert({
prompt: core.getInput("prompt", { required: true }),
effort: core.getInput("effort") || "think",
cwd: core.getInput("cwd") || undefined,
});
const result = await main(inputs);