feat: auto-share ticket URL after task_create

Automatically includes the issue URL in the announcement when
task_create is called, eliminating the need for users to ask
'What's the URL?' after creating a task.

Changes:
- Enhanced announcement formatting with line breaks
- Always includes issue URL with 🔗 prefix
- Improved readability with structured format

Example output:
📋 Created #109: "Fix bug" (To Do)
🔗 https://github.com/user/repo/issues/109
Ready for pickup when needed.

Example with description:
📋 Created #110: "Add feature" (Planning)
With detailed description.
🔗 https://github.com/user/repo/issues/110
Picking up for DEV...

Addresses issue #109
This commit is contained in:
Lauren ten Hoor
2026-02-10 20:36:39 +08:00
parent 4540c9af30
commit 5b601c7db3

View File

@@ -114,6 +114,19 @@ The issue is created with a state label (defaults to "Planning"). Returns the cr
// 5. Build response
const hasBody = description && description.trim().length > 0;
// Build announcement with URL
let announcement = `📋 Created #${issue.iid}: "${title}" (${label})`;
if (hasBody) {
announcement += "\nWith detailed description.";
}
announcement += `\n🔗 ${issue.web_url}`;
if (pickup) {
announcement += "\nPicking up for DEV...";
} else {
announcement += "\nReady for pickup when needed.";
}
const result = {
success: true,
issue: {
@@ -126,9 +139,7 @@ The issue is created with a state label (defaults to "Planning"). Returns the cr
project: project.name,
provider: providerType,
pickup,
announcement: pickup
? `📋 Created #${issue.iid}: "${title}" (${label}).${hasBody ? " With detailed description." : ""} Picking up for DEV...`
: `📋 Created #${issue.iid}: "${title}" (${label}).${hasBody ? " With detailed description." : ""} Ready for pickup when needed.`,
announcement,
};
return jsonResult(result);