feat: include ticket URL in task pickup announcements (#22)
- Add issue URL to announcement in dispatch.ts - Add issueUrl field to workerStart notification event - Update notification message to include URL - Both automated notifications and manual announcements now show full ticket URL Example output: 🔧 Spawning DEV (medior) for #7: Create TODO.md... 🔗 https://github.com/laurentenhoor/devclaw/issues/7
This commit is contained in:
@@ -266,7 +266,7 @@ export async function dispatchTask(
|
||||
? "🔍"
|
||||
: "🔧";
|
||||
const actionVerb = sessionAction === "spawn" ? "Spawning" : "Sending";
|
||||
const announcement = `${emoji} ${actionVerb} ${role.toUpperCase()} (${modelAlias}) for #${issueId}: ${issueTitle}`;
|
||||
const announcement = `${emoji} ${actionVerb} ${role.toUpperCase()} (${modelAlias}) for #${issueId}: ${issueTitle}\n🔗 ${issueUrl}`;
|
||||
|
||||
return {
|
||||
sessionAction,
|
||||
|
||||
@@ -31,6 +31,7 @@ export type NotifyEvent =
|
||||
groupId: string;
|
||||
issueId: number;
|
||||
issueTitle: string;
|
||||
issueUrl: string;
|
||||
role: "dev" | "qa";
|
||||
model: string;
|
||||
sessionAction: "spawn" | "send";
|
||||
@@ -66,7 +67,7 @@ function buildMessage(event: NotifyEvent): string {
|
||||
switch (event.type) {
|
||||
case "workerStart": {
|
||||
const action = event.sessionAction === "spawn" ? "🚀 Started" : "▶️ Resumed";
|
||||
return `${action} ${event.role.toUpperCase()} (${event.model}) on #${event.issueId}: ${event.issueTitle}`;
|
||||
return `${action} ${event.role.toUpperCase()} (${event.model}) on #${event.issueId}: ${event.issueTitle}\n🔗 ${event.issueUrl}`;
|
||||
}
|
||||
|
||||
case "workerComplete": {
|
||||
|
||||
@@ -322,6 +322,7 @@ export function createTaskPickupTool(api: OpenClawPluginApi) {
|
||||
groupId,
|
||||
issueId: issue.iid,
|
||||
issueTitle: issue.title,
|
||||
issueUrl: issue.web_url,
|
||||
role,
|
||||
model: dispatchResult.modelAlias,
|
||||
sessionAction: dispatchResult.sessionAction,
|
||||
|
||||
Reference in New Issue
Block a user