- include new categorized output which contains a serialized JSON string with the categorized pull requests
This commit is contained in:
@@ -90,7 +90,7 @@ A full set list of possible output values for this action.
|
|||||||
| `outputs.deletions` | Count of code deletions in this release (lines). |
|
| `outputs.deletions` | Count of code deletions in this release (lines). |
|
||||||
| `outputs.changes` | Total count of changes in this release (lines). |
|
| `outputs.changes` | Total count of changes in this release (lines). |
|
||||||
| `outputs.commits` | Count of commits which have been added in this release. |
|
| `outputs.commits` | Count of commits which have been added in this release. |
|
||||||
|
| `outputs.categorized` | The categorized pull requests used to build the changelog as serialized JSON. |
|
||||||
|
|
||||||
## Full Sample 🖥️
|
## Full Sample 🖥️
|
||||||
|
|
||||||
|
|||||||
+3
@@ -1830,6 +1830,9 @@ function buildChangelog(diffInfo, prs, options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.info(`ℹ️ Ordered all pull requests into ${categories.length} categories`);
|
core.info(`ℹ️ Ordered all pull requests into ${categories.length} categories`);
|
||||||
|
// serialize and provide the categorized content as json
|
||||||
|
const transformedCategorized = Array.from(categorized).reduce((obj, [key, value]) => Object.assign(obj, { [key.title]: value }), {});
|
||||||
|
core.setOutput('categorized', JSON.stringify(transformedCategorized));
|
||||||
// construct final changelog
|
// construct final changelog
|
||||||
let changelog = '';
|
let changelog = '';
|
||||||
for (const [category, pullRequests] of categorized) {
|
for (const [category, pullRequests] of categorized) {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -179,6 +179,10 @@ export function buildChangelog(diffInfo: DiffInfo, prs: PullRequestInfo[], optio
|
|||||||
}
|
}
|
||||||
core.info(`ℹ️ Ordered all pull requests into ${categories.length} categories`)
|
core.info(`ℹ️ Ordered all pull requests into ${categories.length} categories`)
|
||||||
|
|
||||||
|
// serialize and provide the categorized content as json
|
||||||
|
const transformedCategorized = Array.from(categorized).reduce((obj, [key, value]) => Object.assign(obj, {[key.title]: value}), {})
|
||||||
|
core.setOutput('categorized', JSON.stringify(transformedCategorized))
|
||||||
|
|
||||||
// construct final changelog
|
// construct final changelog
|
||||||
let changelog = ''
|
let changelog = ''
|
||||||
for (const [category, pullRequests] of categorized) {
|
for (const [category, pullRequests] of categorized) {
|
||||||
|
|||||||
Reference in New Issue
Block a user