feat: add task_update and task_comment tools (#33)
Closes #26 This PR adds two new DevClaw tools for better task lifecycle management: - task_update: Change issue state programmatically without full pickup/complete flow - task_comment: Add review comments or notes to issues with optional role attribution
This commit is contained in:
@@ -197,6 +197,26 @@ export class GitHubProvider implements TaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
async addComment(issueId: number, body: string): Promise<void> {
|
||||
// Write body to temp file to preserve newlines
|
||||
const tempFile = join(tmpdir(), `devclaw-comment-${Date.now()}.md`);
|
||||
await writeFile(tempFile, body, "utf-8");
|
||||
|
||||
try {
|
||||
await this.gh([
|
||||
"issue", "comment", String(issueId),
|
||||
"--body-file", tempFile,
|
||||
]);
|
||||
} finally {
|
||||
// Clean up temp file
|
||||
try {
|
||||
await unlink(tempFile);
|
||||
} catch {
|
||||
// Ignore cleanup errors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async healthCheck(): Promise<boolean> {
|
||||
try {
|
||||
await this.gh(["auth", "status"]);
|
||||
|
||||
Reference in New Issue
Block a user