- introduce new RELEASE_DIFF placeholder, adding a full diff link

- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/667
  - Thanks for the proposal @maxisam
This commit is contained in:
Mike Penz
2022-02-02 18:21:37 +01:00
parent 292179d486
commit c8b0107b59
4 changed files with 7 additions and 1 deletions
+1
View File
@@ -295,6 +295,7 @@ Table of supported placeholders allowed to be used in the `template` and `empty_
| `${{REPO}}` | The repository name of the repo the changelog was generated for | x |
| `${{FROM_TAG}}` | Defines the 'start' from where the changelog did consider merged pull requests | x |
| `${{TO_TAG}}` | Defines until which tag the changelog did consider merged pull requests | x |
| `${{RELEASE_DIFF}}` | Introduces a link to the full diff between from tag and to tag releases | x |
| `${{CATEGORIZED_COUNT}}` | The count of PRs which were categorized | |
| `${{UNCATEGORIZED_COUNT}}` | The count of PRs and changes which were not categorized. No label overlapping with category labels | |
| `${{IGNORED_COUNT}}` | The count of PRs and changes which were specifically ignored from the changelog. | |
Generated Vendored
+1
View File
@@ -1343,6 +1343,7 @@ function fillAdditionalPlaceholders(text, options) {
transformed = transformed.replace(/\${{REPO}}/g, options.repo);
transformed = transformed.replace(/\${{FROM_TAG}}/g, options.fromTag);
transformed = transformed.replace(/\${{TO_TAG}}/g, options.toTag);
transformed = transformed.replace(/\${{RELEASE_DIFF}}/g, `https://github.com/${options.owner}/${options.repo}/compare/${options.fromTag}...${options.toTag}`);
return transformed;
}
exports.fillAdditionalPlaceholders = fillAdditionalPlaceholders;
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -228,6 +228,10 @@ export function fillAdditionalPlaceholders(
transformed = transformed.replace(/\${{REPO}}/g, options.repo)
transformed = transformed.replace(/\${{FROM_TAG}}/g, options.fromTag)
transformed = transformed.replace(/\${{TO_TAG}}/g, options.toTag)
transformed = transformed.replace(
/\${{RELEASE_DIFF}}/g,
`https://github.com/${options.owner}/${options.repo}/compare/${options.fromTag}...${options.toTag}`
)
return transformed
}