linear-github-cli 1.1.4 ā 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,13 +53,10 @@ async function createParentIssue() {
|
|
|
53
53
|
const githubProject = await inputHandler.selectProject(repo);
|
|
54
54
|
// Step 4: Create GitHub issue
|
|
55
55
|
console.log('\nš Creating GitHub issue...');
|
|
56
|
-
const body = details.dueDate
|
|
57
|
-
? `Due Date: ${details.dueDate}\n\n${details.description}`
|
|
58
|
-
: details.description;
|
|
59
56
|
const issue = await githubClient.createIssue({
|
|
60
57
|
repo,
|
|
61
58
|
title: details.title,
|
|
62
|
-
body,
|
|
59
|
+
body: details.description,
|
|
63
60
|
labels: details.labels,
|
|
64
61
|
assignees: ['@me'],
|
|
65
62
|
project: githubProject || undefined,
|
|
@@ -54,14 +54,11 @@ async function createSubIssue() {
|
|
|
54
54
|
const details = await inputHandler.promptIssueDetails(repo);
|
|
55
55
|
// Step 4: Create sub-issue
|
|
56
56
|
console.log('\nš Creating sub-issue...');
|
|
57
|
-
const body = details.dueDate
|
|
58
|
-
? `Due Date: ${details.dueDate}\n\n${details.description}`
|
|
59
|
-
: details.description;
|
|
60
57
|
const subIssue = await githubClient.createSubIssue({
|
|
61
58
|
repo,
|
|
62
59
|
parentIssueNumber,
|
|
63
60
|
title: details.title,
|
|
64
|
-
body,
|
|
61
|
+
body: details.description,
|
|
65
62
|
labels: details.labels,
|
|
66
63
|
assignees: ['@me'],
|
|
67
64
|
});
|
package/dist/github-client.js
CHANGED
|
@@ -46,7 +46,16 @@ class GitHubClientWrapper {
|
|
|
46
46
|
(params.labels && params.labels.length > 0 ? `--label "${params.labels.join(',')}" ` : '') +
|
|
47
47
|
(params.assignees && params.assignees.length > 0 ? `--assignee "${params.assignees.join(',')}" ` : '') +
|
|
48
48
|
(params.project ? `--project "${params.project}" ` : '');
|
|
49
|
-
|
|
49
|
+
let output;
|
|
50
|
+
try {
|
|
51
|
+
output = (0, child_process_1.execSync)(command, { encoding: 'utf-8' });
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const errorMessage = error?.stderr?.toString().trim() || error?.message || String(error);
|
|
55
|
+
throw new Error(`Failed to create GitHub issue.\n` +
|
|
56
|
+
`Reason: ${errorMessage}\n` +
|
|
57
|
+
`Please review the issue body and try again.`);
|
|
58
|
+
}
|
|
50
59
|
// Parse URL from output: "https://github.com/owner/repo/issues/123"
|
|
51
60
|
const urlMatch = output.match(/https:\/\/github\.com\/[^\/]+\/[^\/]+\/issues\/(\d+)/);
|
|
52
61
|
if (!urlMatch) {
|