@jjdenhertog/ai-driven-development
Version:
AI-driven development workflow with learning capabilities for Claude
25 lines (23 loc) • 957 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPRContent = getPRContent;
const fs_extra_1 = require("fs-extra");
const node_path_1 = require("node:path");
const config_1 = require("../../config");
const logger_1 = require("../logger");
function getPRContent(task) {
// Always use absolute path to worktree output directory
const prPath = (0, node_path_1.join)(config_1.TASKS_OUTPUT_DIR, task.id, 'last_result.md');
if (!(0, fs_extra_1.existsSync)(prPath)) {
(0, logger_1.log)(`PR file not found at ${prPath}, creating fallback PR content`, 'warn');
// Create fallback PR content
return `## ⚠️ Automated PR Description Missing
The AI automation did not generate a PR description for this task.
### Task Details
- **Task ID**: ${task.id}
- **Task Name**: ${task.name}
`;
}
return (0, fs_extra_1.readFileSync)(prPath, 'utf8');
}
//# sourceMappingURL=getPRContent.js.map