- expand on_property for extractor to README

This commit is contained in:
Mike Penz
2021-03-04 16:21:40 +01:00
parent 0bbac0be0f
commit edd1dfa6f3
+9 -3
View File
@@ -167,6 +167,11 @@ This configuration is a `.json` file in the following format.
{ {
"pattern": "(.) (.+)", "pattern": "(.) (.+)",
"target": "$1" "target": "$1"
},
{
"pattern": "(.) (.+)",
"target": "$1",
"on_property": "title"
} }
], ],
"transformers": [ "transformers": [
@@ -272,7 +277,7 @@ Table of supported placeholders allowed to be used in the `template` and `empty_
Table of descriptions for the `configuration.json` options to configure the resulting release notes / changelog. Table of descriptions for the `configuration.json` options to configure the resulting release notes / changelog.
| **Input** | **Description** | | **Input** | **Description** |
|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| categories | An array of `category` specifications, offering a flexible way to group changes into categories | | categories | An array of `category` specifications, offering a flexible way to group changes into categories |
| category.title | The display name of a category in the changelog | | category.title | The display name of a category in the changelog |
| category.labels | An array of labels, to match pull request labels against. If any PR label matches any category label, the pull request will show up under this category | | category.labels | An array of labels, to match pull request labels against. If any PR label matches any category label, the pull request will show up under this category |
@@ -281,9 +286,10 @@ Table of descriptions for the `configuration.json` options to configure the resu
| template | Specifies the global template to pick for creating the changelog. See [Template placeholders](#template-placeholders) for possible values | | template | Specifies the global template to pick for creating the changelog. See [Template placeholders](#template-placeholders) for possible values |
| pr_template | Defines the per pull request template. See [PR Template placeholders](#pr-template-placeholders) for possible values | | pr_template | Defines the per pull request template. See [PR Template placeholders](#pr-template-placeholders) for possible values |
| empty_template | Template to pick if no changes are detected. See [Template placeholders](#template-placeholders) for possible values | | empty_template | Template to pick if no changes are detected. See [Template placeholders](#template-placeholders) for possible values |
| label_extractor | An array of `transform` specifications, offering a flexible API to extract additinal labels from the body of a PR (in case of commit mode, from the commit message). | | label_extractor | An array of `transform` specifications, offering a flexible API to extract additinal labels from a PR (Default: `body`, Default in commit mode: `commit message`). |
| label_extractor.pattern | A `regex` pattern, extracting values of the change message. | | label_extractor.pattern | A `regex` pattern, extracting values of the change message. |
| label_extractor.target | The result pattern. The result text will be used as label. If empty, no label is created | | label_extractor.target | The result pattern. The result text will be used as label. If empty, no label is created. |
| label_extractor.on_property | The property to retrieve the text from. This is optional. Defaults to: `body`. Alternative values: `title`, `author`, `milestone`. |
| transformers | An array of `transform` specifications, offering a flexible API to modify the text per pull request. This is applied on the change text created with `pr_template`. `transformers` are executed per change, in the order specified | | transformers | An array of `transform` specifications, offering a flexible API to modify the text per pull request. This is applied on the change text created with `pr_template`. `transformers` are executed per change, in the order specified |
| transformer.pattern | A `regex` pattern, extracting values of the change message. | | transformer.pattern | A `regex` pattern, extracting values of the change message. |
| transformer.target | The result pattern, the regex groups will be filled into. Allows for full transformation of a pull request message. Including potentially specified texts | | transformer.target | The result pattern, the regex groups will be filled into. Allows for full transformation of a pull request message. Including potentially specified texts |