- adjust placeholder for yml as ${{}} is reserved
This commit is contained in:
@@ -42,7 +42,7 @@ jobs:
|
|||||||
toTag: "v0.0.3"
|
toTag: "v0.0.3"
|
||||||
configurationJson: |
|
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": [
|
"categories": [
|
||||||
{
|
{
|
||||||
"title": "## 🚀 Features",
|
"title": "## 🚀 Features",
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
configurationJson: |
|
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": [
|
"categories": [
|
||||||
{
|
{
|
||||||
"title": "## 💬 Other",
|
"title": "## 💬 Other",
|
||||||
@@ -301,7 +301,7 @@ For advanced use cases additional settings can be provided to the action
|
|||||||
|
|
||||||
| **Input** | **Description** |
|
| **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 |
|
| `configuration` | Relative path, to the `configuration.json` file, providing additional configurations |
|
||||||
| `outputFile` | Optional relative path to a file to store the resulting changelog in. |
|
| `outputFile` | Optional relative path to a file to store the resulting changelog in. |
|
||||||
| `owner` | The owner of the repository to generate the changelog for |
|
| `owner` | The owner of the repository to generate the changelog for |
|
||||||
|
|||||||
+2
-1
@@ -1928,7 +1928,8 @@ function readConfiguration(filename) {
|
|||||||
*/
|
*/
|
||||||
function parseConfiguration(config) {
|
function parseConfiguration(config) {
|
||||||
try {
|
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;
|
return configurationJSON;
|
||||||
}
|
}
|
||||||
catch (error) {
|
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 {
|
export function parseConfiguration(config: string): Configuration | undefined {
|
||||||
try {
|
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
|
return configurationJSON
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.info(
|
core.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user