feat: enhance notification URLs with issue links and tool aliases

Improvements to notification system for better traceability:

1. DEV Completion Notifications:
   - Always include issue URL (📋 Issue: ...)
   - Include PR/MR URL when available (🔗 PR: ...)
   - Issue URL serves as fallback when PR/MR not found
   - Both URLs shown when PR/MR exists for maximum traceability

2. QA Pass Notifications:
   - Now include issue URL (📋 Issue: ...)
   - Provides direct link to resolved issue

3. Tool Aliases:
   - Added 'work_finish' as alias for 'task_complete'
   - Added 'work_start' as alias for 'task_pickup'
   - Added 'status' as alias for 'queue_status'
   - Matches naming used in AGENTS.md documentation

Example DEV notification:
 DEV done #106 — Enhanced notification URLs
📋 Issue: https://github.com/user/repo/issues/106
🔗 PR: https://github.com/user/repo/pull/107
Moved to QA queue.

Example QA notification:
🎉 QA PASS #106 — All tests passed
📋 Issue: https://github.com/user/repo/issues/106
Issue closed.

Addresses issue #106
This commit is contained in:
Lauren ten Hoor
2026-02-10 20:32:51 +08:00
parent 7339a8395d
commit 2260f39383
2 changed files with 17 additions and 6 deletions

View File

@@ -138,6 +138,10 @@ export function createTaskCompleteTool(api: OpenClawPluginApi) {
output.gitPull = `warning: ${(err as Error).message}`;
}
// Fetch issue to get URL
const issue = await provider.getIssue(issueId);
const issueUrl = issue.web_url;
// Auto-detect PR/MR URL if not provided
if (!prUrl) {
try {
@@ -152,17 +156,19 @@ export function createTaskCompleteTool(api: OpenClawPluginApi) {
output.labelTransition = "Doing → To Test";
// Build announcement with PR URL if available
// Build announcement with URLs
let announcement = `✅ DEV done #${issueId}`;
if (summary) {
announcement += `${summary}`;
}
announcement += `\n📋 Issue: ${issueUrl}`;
if (prUrl) {
announcement += `\n🔗 PR: ${prUrl}`;
}
announcement += `. Moved to QA queue.`;
announcement += `\nMoved to QA queue.`;
output.announcement = announcement;
output.issueUrl = issueUrl;
if (prUrl) {
output.prUrl = prUrl;
}
@@ -215,13 +221,18 @@ export function createTaskCompleteTool(api: OpenClawPluginApi) {
// === QA PASS ===
if (role === "qa" && result === "pass") {
// Fetch issue to get URL
const issue = await provider.getIssue(issueId);
const issueUrl = issue.web_url;
await deactivateWorker(workspaceDir, groupId, "qa");
await provider.transitionLabel(issueId, "Testing", "Done");
await provider.closeIssue(issueId);
output.labelTransition = "Testing → Done";
output.issueClosed = true;
output.announcement = `🎉 QA PASS #${issueId}${summary ? `${summary}` : ""}. Issue closed.`;
output.issueUrl = issueUrl;
output.announcement = `🎉 QA PASS #${issueId}${summary ? `${summary}` : ""}\n📋 Issue: ${issueUrl}\nIssue closed.`;
}
// === QA FAIL ===