@miketromba/issy-core 0.5.7 → 0.6.0
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.
- package/package.json +1 -1
- package/src/lib/issues.ts +9 -10
- package/src/lib/types.ts +2 -0
package/package.json
CHANGED
package/src/lib/issues.ts
CHANGED
|
@@ -439,13 +439,9 @@ export async function createIssue(input: CreateIssueInput): Promise<Issue> {
|
|
|
439
439
|
created: formatDate()
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
<!-- Add detailed description here -->
|
|
447
|
-
|
|
448
|
-
`
|
|
442
|
+
const body =
|
|
443
|
+
input.body ?? '\n## Details\n\n<!-- Add detailed description here -->\n'
|
|
444
|
+
const content = `${generateFrontmatter(frontmatter)}\n${body}\n`
|
|
449
445
|
|
|
450
446
|
await writeFile(join(getIssuesDir(), filename), content)
|
|
451
447
|
|
|
@@ -453,7 +449,7 @@ export async function createIssue(input: CreateIssueInput): Promise<Issue> {
|
|
|
453
449
|
id: issueNumber,
|
|
454
450
|
filename,
|
|
455
451
|
frontmatter,
|
|
456
|
-
content:
|
|
452
|
+
content: `\n${body}\n`
|
|
457
453
|
}
|
|
458
454
|
}
|
|
459
455
|
|
|
@@ -482,14 +478,17 @@ export async function updateIssue(
|
|
|
482
478
|
updated: formatDate()
|
|
483
479
|
}
|
|
484
480
|
|
|
481
|
+
const updatedContent =
|
|
482
|
+
input.body !== undefined ? `\n${input.body}\n` : issue.content
|
|
485
483
|
const content = `${generateFrontmatter(updatedFrontmatter)}
|
|
486
|
-
${
|
|
484
|
+
${updatedContent}`
|
|
487
485
|
|
|
488
486
|
await writeFile(join(getIssuesDir(), issue.filename), content)
|
|
489
487
|
|
|
490
488
|
return {
|
|
491
489
|
...issue,
|
|
492
|
-
frontmatter: updatedFrontmatter
|
|
490
|
+
frontmatter: updatedFrontmatter,
|
|
491
|
+
content: updatedContent
|
|
493
492
|
}
|
|
494
493
|
}
|
|
495
494
|
|
package/src/lib/types.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface IssueFilters {
|
|
|
33
33
|
export interface CreateIssueInput {
|
|
34
34
|
title: string
|
|
35
35
|
description?: string
|
|
36
|
+
body?: string
|
|
36
37
|
priority?: 'high' | 'medium' | 'low'
|
|
37
38
|
scope?: 'small' | 'medium' | 'large'
|
|
38
39
|
type?: 'bug' | 'improvement'
|
|
@@ -43,6 +44,7 @@ export interface CreateIssueInput {
|
|
|
43
44
|
export interface UpdateIssueInput {
|
|
44
45
|
title?: string
|
|
45
46
|
description?: string
|
|
47
|
+
body?: string
|
|
46
48
|
priority?: 'high' | 'medium' | 'low'
|
|
47
49
|
scope?: 'small' | 'medium' | 'large'
|
|
48
50
|
type?: 'bug' | 'improvement'
|