- recompile dist files
This commit is contained in:
+22
-7
@@ -590,7 +590,7 @@ class ReleaseNotes {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
core.startGroup('📦 Build changelog');
|
core.startGroup('📦 Build changelog');
|
||||||
const resultChangelog = transform_1.buildChangelog(mergedPullRequests, configuration);
|
const resultChangelog = transform_1.buildChangelog(mergedPullRequests, configuration, this.options);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
return resultChangelog;
|
return resultChangelog;
|
||||||
});
|
});
|
||||||
@@ -708,6 +708,7 @@ const utils_1 = __webpack_require__(918);
|
|||||||
const rest_1 = __webpack_require__(5375);
|
const rest_1 = __webpack_require__(5375);
|
||||||
const tags_1 = __webpack_require__(7532);
|
const tags_1 = __webpack_require__(7532);
|
||||||
const releaseNotes_1 = __webpack_require__(5882);
|
const releaseNotes_1 = __webpack_require__(5882);
|
||||||
|
const transform_1 = __webpack_require__(1644);
|
||||||
class ReleaseNotesBuilder {
|
class ReleaseNotesBuilder {
|
||||||
constructor(token, repositoryPath, owner, repo, fromTag, toTag, failOnError, ignorePreReleases, configuration) {
|
constructor(token, repositoryPath, owner, repo, fromTag, toTag, failOnError, ignorePreReleases, configuration) {
|
||||||
this.token = token;
|
this.token = token;
|
||||||
@@ -781,17 +782,18 @@ class ReleaseNotesBuilder {
|
|||||||
core.debug(`fromTag resolved via previousTag as: ${previousTag.name}`);
|
core.debug(`fromTag resolved via previousTag as: ${previousTag.name}`);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
const releaseNotes = new releaseNotes_1.ReleaseNotes(octokit, {
|
const options = {
|
||||||
owner: this.owner,
|
owner: this.owner,
|
||||||
repo: this.repo,
|
repo: this.repo,
|
||||||
fromTag: this.fromTag,
|
fromTag: this.fromTag,
|
||||||
toTag: this.toTag,
|
toTag: this.toTag,
|
||||||
failOnError: this.failOnError,
|
failOnError: this.failOnError,
|
||||||
configuration: this.configuration
|
configuration: this.configuration
|
||||||
});
|
};
|
||||||
|
const releaseNotes = new releaseNotes_1.ReleaseNotes(octokit, options);
|
||||||
return ((yield releaseNotes.pull()) ||
|
return ((yield releaseNotes.pull()) ||
|
||||||
this.configuration.empty_template ||
|
transform_1.fillAdditionalPlaceholders(this.configuration.empty_template ||
|
||||||
configuration_1.DefaultConfiguration.empty_template);
|
configuration_1.DefaultConfiguration.empty_template, options));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -976,11 +978,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.buildChangelog = void 0;
|
exports.fillAdditionalPlaceholders = exports.buildChangelog = void 0;
|
||||||
const pullRequests_1 = __webpack_require__(4217);
|
const pullRequests_1 = __webpack_require__(4217);
|
||||||
const core = __importStar(__webpack_require__(2186));
|
const core = __importStar(__webpack_require__(2186));
|
||||||
const configuration_1 = __webpack_require__(5527);
|
const configuration_1 = __webpack_require__(5527);
|
||||||
function buildChangelog(prs, config) {
|
function buildChangelog(prs, config, options) {
|
||||||
// sort to target order
|
// sort to target order
|
||||||
const sort = config.sort || configuration_1.DefaultConfiguration.sort;
|
const sort = config.sort || configuration_1.DefaultConfiguration.sort;
|
||||||
const sortAsc = sort.toUpperCase() === 'ASC';
|
const sortAsc = sort.toUpperCase() === 'ASC';
|
||||||
@@ -1037,10 +1039,23 @@ function buildChangelog(prs, config) {
|
|||||||
let transformedChangelog = config.template || configuration_1.DefaultConfiguration.template;
|
let transformedChangelog = config.template || configuration_1.DefaultConfiguration.template;
|
||||||
transformedChangelog = transformedChangelog.replace('${{CHANGELOG}}', changelog);
|
transformedChangelog = transformedChangelog.replace('${{CHANGELOG}}', changelog);
|
||||||
transformedChangelog = transformedChangelog.replace('${{UNCATEGORIZED}}', changelogUncategorized);
|
transformedChangelog = transformedChangelog.replace('${{UNCATEGORIZED}}', changelogUncategorized);
|
||||||
|
// fill other placeholders
|
||||||
|
transformedChangelog = transformedChangelog.replace('${{CATEGORIZED_COUNT}}', categorized.size.toString());
|
||||||
|
transformedChangelog = transformedChangelog.replace('${{UNCATEGORIZED_COUNT}}', uncategorized.length.toString());
|
||||||
|
transformedChangelog = fillAdditionalPlaceholders(transformedChangelog, options);
|
||||||
core.info(`ℹ️ Filled template`);
|
core.info(`ℹ️ Filled template`);
|
||||||
return transformedChangelog;
|
return transformedChangelog;
|
||||||
}
|
}
|
||||||
exports.buildChangelog = buildChangelog;
|
exports.buildChangelog = buildChangelog;
|
||||||
|
function fillAdditionalPlaceholders(text, options) {
|
||||||
|
let transformed = text;
|
||||||
|
transformed = transformed.replace('${{OWNER}}', options.owner);
|
||||||
|
transformed = transformed.replace('${{REPO}}', options.repo);
|
||||||
|
transformed = transformed.replace('${{FROM_TAG}}', options.fromTag);
|
||||||
|
transformed = transformed.replace('${{TO_TAG}}', options.toTag);
|
||||||
|
return transformed;
|
||||||
|
}
|
||||||
|
exports.fillAdditionalPlaceholders = fillAdditionalPlaceholders;
|
||||||
function haveCommonElements(arr1, arr2) {
|
function haveCommonElements(arr1, arr2) {
|
||||||
return arr1.some(item => arr2.includes(item));
|
return arr1.some(item => arr2.includes(item));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user