- adjust placeholder for yml as ${{}} is reserved
This commit is contained in:
@@ -42,7 +42,7 @@ jobs:
|
||||
toTag: "v0.0.3"
|
||||
configurationJson: |
|
||||
{
|
||||
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>",
|
||||
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
|
||||
"categories": [
|
||||
{
|
||||
"title": "## 🚀 Features",
|
||||
|
||||
@@ -147,7 +147,7 @@ jobs:
|
||||
with:
|
||||
configurationJson: |
|
||||
{
|
||||
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>",
|
||||
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
|
||||
"categories": [
|
||||
{
|
||||
"title": "## 💬 Other",
|
||||
@@ -301,7 +301,7 @@ For advanced use cases additional settings can be provided to the action
|
||||
|
||||
| **Input** | **Description** |
|
||||
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `configurationJson` | Provide the configuration directly via the build `yml` file. |
|
||||
| `configurationJson` | Provide the configuration directly via the build `yml` file. Please note that `${{}}` has to be written as `#{{}}` within the `yml` file. |
|
||||
| `configuration` | Relative path, to the `configuration.json` file, providing additional configurations |
|
||||
| `outputFile` | Optional relative path to a file to store the resulting changelog in. |
|
||||
| `owner` | The owner of the repository to generate the changelog for |
|
||||
|
||||
+2
-1
@@ -1928,7 +1928,8 @@ function readConfiguration(filename) {
|
||||
*/
|
||||
function parseConfiguration(config) {
|
||||
try {
|
||||
const configurationJSON = JSON.parse(config);
|
||||
// for compatiblity with the `yml` file we require to use `#{{}}` instead of `${{}}` - replace it here.
|
||||
const configurationJSON = JSON.parse(config.replace(/#{{/g, '${{'));
|
||||
return configurationJSON;
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-1
@@ -86,7 +86,10 @@ function readConfiguration(filename: string): Configuration | undefined {
|
||||
*/
|
||||
export function parseConfiguration(config: string): Configuration | undefined {
|
||||
try {
|
||||
const configurationJSON: Configuration = JSON.parse(config)
|
||||
// for compatiblity with the `yml` file we require to use `#{{}}` instead of `${{}}` - replace it here.
|
||||
const configurationJSON: Configuration = JSON.parse(
|
||||
config.replace(/#{{/g, '${{')
|
||||
)
|
||||
return configurationJSON
|
||||
} catch (error) {
|
||||
core.info(
|
||||
|
||||
Reference in New Issue
Block a user