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:
@@ -114,6 +114,19 @@ The issue is created with a state label (defaults to "Planning"). Returns the cr
|
|||||||
|
|
||||||
// 5. Build response
|
// 5. Build response
|
||||||
const hasBody = description && description.trim().length > 0;
|
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 = {
|
const result = {
|
||||||
success: true,
|
success: true,
|
||||||
issue: {
|
issue: {
|
||||||
@@ -126,9 +139,7 @@ The issue is created with a state label (defaults to "Planning"). Returns the cr
|
|||||||
project: project.name,
|
project: project.name,
|
||||||
provider: providerType,
|
provider: providerType,
|
||||||
pickup,
|
pickup,
|
||||||
announcement: pickup
|
announcement,
|
||||||
? `📋 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.`,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return jsonResult(result);
|
return jsonResult(result);
|
||||||
|
|||||||
Reference in New Issue
Block a user