asciidoctor-jira 3.4.2 → 4.0.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.
|
@@ -22,10 +22,11 @@ function jiraIssuesBlockMacro (context) {
|
|
|
22
22
|
const issues = jiraClient.searchIssues(jql, customFieldIds)
|
|
23
23
|
|
|
24
24
|
const headers = createHeaders(doc, customFields)
|
|
25
|
+
const columnSize = createColumnSize(doc, customFields)
|
|
25
26
|
const customFieldsArray = customFields.split(',').filter(item => item !== 'issuetype')
|
|
26
27
|
|
|
27
28
|
const content = []
|
|
28
|
-
content.push(
|
|
29
|
+
content.push(`[options="header", cols="${columnSize.join(',')}"]`)
|
|
29
30
|
content.push('|====')
|
|
30
31
|
content.push('|' + headers.join('|'))
|
|
31
32
|
|
|
@@ -85,6 +86,18 @@ function createHeaders (doc, customFieldIds) {
|
|
|
85
86
|
return headers
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
function createColumnSize (doc, customFieldIds) {
|
|
90
|
+
const cols = []
|
|
91
|
+
const customFieldsArray = customFieldIds.split(',').filter(item => item !== 'issuetype')
|
|
92
|
+
cols.push(doc.getAttribute('jira-table-header-id-size', 1))
|
|
93
|
+
for (let i = 0; i < customFieldsArray.length; i++) {
|
|
94
|
+
let field = customFieldsArray[i]
|
|
95
|
+
field = `jira-table-header-${field.replace(/\./g, '-').toLowerCase()}-size`
|
|
96
|
+
cols.push(doc.getAttribute(field, 2))
|
|
97
|
+
}
|
|
98
|
+
return cols
|
|
99
|
+
}
|
|
100
|
+
|
|
88
101
|
module.exports = {
|
|
89
102
|
blockMacro: (context) => {
|
|
90
103
|
return jiraIssuesBlockMacro(context)
|
package/package.json
CHANGED