imdone-core 1.44.2 → 1.44.4
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/lib/plugins/epic-plugin.js +11 -6
- package/lib/project.js +5 -0
- package/package.json +1 -1
|
@@ -62,7 +62,8 @@ module.exports = class EpicPlugin extends Plugin {
|
|
|
62
62
|
addEpicItem(name, task) {
|
|
63
63
|
const list = task.list
|
|
64
64
|
this.initEpic(name)
|
|
65
|
-
if (!this.
|
|
65
|
+
if (!this.getEpicItemsInList(name, list)) this.epics[name].items[list] = []
|
|
66
|
+
if (this.getEpicItemsInList(name, list).find((t) => t.id === task.id)) return
|
|
66
67
|
this.epics[name].items[list].push(task)
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -74,11 +75,15 @@ module.exports = class EpicPlugin extends Plugin {
|
|
|
74
75
|
return this.epics[name].epic
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
getEpicItems(name
|
|
78
|
-
|
|
78
|
+
getEpicItems(name) {
|
|
79
|
+
return this.epics[name].items
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getEpicItemsInList(name, list) {
|
|
79
83
|
return this.epics[name].items[list]
|
|
80
84
|
}
|
|
81
85
|
|
|
86
|
+
|
|
82
87
|
getEpicLists(name) {
|
|
83
88
|
return Object.keys(this.getEpicItems(name))
|
|
84
89
|
}
|
|
@@ -117,7 +122,7 @@ module.exports = class EpicPlugin extends Plugin {
|
|
|
117
122
|
|
|
118
123
|
// Add epic link to epic tasks
|
|
119
124
|
epicLists.forEach((list) => {
|
|
120
|
-
this.
|
|
125
|
+
this.getEpicItemsInList(epicId, list).forEach((task) => {
|
|
121
126
|
task.interpretedContent = epicLink + task.interpretedContent
|
|
122
127
|
task.init()
|
|
123
128
|
})
|
|
@@ -145,10 +150,10 @@ module.exports = class EpicPlugin extends Plugin {
|
|
|
145
150
|
let content = ''
|
|
146
151
|
|
|
147
152
|
lists
|
|
148
|
-
.filter((list) => this.
|
|
153
|
+
.filter((list) => this.getEpicItemsInList(epicId, list.name))
|
|
149
154
|
.reverse()
|
|
150
155
|
.forEach((list) => {
|
|
151
|
-
const tasks = this.
|
|
156
|
+
const tasks = this.getEpicItemsInList(epicId, list.name)
|
|
152
157
|
const listUrl = epicUrl + encodeURIComponent(` and list=${list.name}`)
|
|
153
158
|
const listLink = `[${list.name}](${listUrl})`
|
|
154
159
|
content = content + '\n\n#### ' + listLink + '\n'
|
package/lib/project.js
CHANGED
|
@@ -15,6 +15,7 @@ const exec = require('child_process').exec
|
|
|
15
15
|
const fastSort = require('fast-sort/dist/sort.js')
|
|
16
16
|
const Task = require('./task')
|
|
17
17
|
const eol = require('eol')
|
|
18
|
+
const { renderMarkdown } = require('./adapters/markdown')
|
|
18
19
|
|
|
19
20
|
function calculateTotals(lists) {
|
|
20
21
|
const totals = {}
|
|
@@ -777,4 +778,8 @@ module.exports = class WorkerProject extends Project {
|
|
|
777
778
|
})
|
|
778
779
|
})
|
|
779
780
|
}
|
|
781
|
+
|
|
782
|
+
renderMarkdown(content) {
|
|
783
|
+
return renderMarkdown(content)
|
|
784
|
+
}
|
|
780
785
|
}
|