- add details about array placeholders
- fix url to rules for categories
This commit is contained in:
@@ -310,7 +310,7 @@ For advanced use cases additional settings can be provided to the action
|
||||
> **Note**: All input values are optional. It is only required to provide the `token` either via the input, or as `env` variable.
|
||||
|
||||
| **Input** | **Description** |
|
||||
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `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. |
|
||||
@@ -336,21 +336,52 @@ For advanced use cases additional settings can be provided to the action
|
||||
Table of supported placeholders allowed to be used in the `pr_template` configuration, which will be included in the release notes / changelog.
|
||||
|
||||
| **Placeholder** | **Description** |
|
||||
|-------------------|-------------------------------------------------------------------|
|
||||
| `${{NUMBER}}` | The number referencing this pull request. E.g. 13 |
|
||||
| `${{TITLE}}` | Specified title of the merged pull request |
|
||||
| `${{URL}}` | Url linking to the pull request on GitHub |
|
||||
|-------------------|----------------------------------------------------------------------------------------------------|
|
||||
| `${{NUMBER}}` | The number referencing this pull request. E.g. 13. |
|
||||
| `${{TITLE}}` | Specified title of the merged pull request. |
|
||||
| `${{URL}}` | Url linking to the pull request on GitHub. |
|
||||
| `${{STATUS}}` | Status of the PR. Usually always `merged`. Possibly `Open` if `includeOpen` is configured. |
|
||||
| `${{CREATED_AT}}` | The ISO time, the pull request was created at |
|
||||
| `${{MERGED_AT}}` | The ISO time, the pull request was merged at |
|
||||
| `${{MERGE_SHA}}` | The commit SHA, the pull request was merged with |
|
||||
| `${{AUTHOR}}` | Author creating and opening the pull request |
|
||||
| `${{LABELS}}` | The labels associated with this pull request, joined by `,` |
|
||||
| `${{MILESTONE}}` | Milestone this PR was part of, as assigned on GitHub |
|
||||
| `${{BODY}}` | Description/Body of the pull request as specified on GitHub |
|
||||
| `${{ASSIGNEES}}` | Login names of assigned GitHub users, joined by `,` |
|
||||
| `${{CREATED_AT}}` | The ISO time, the pull request was created at. |
|
||||
| `${{MERGED_AT}}` | The ISO time, the pull request was merged at. |
|
||||
| `${{MERGE_SHA}}` | The commit SHA, the pull request was merged with. |
|
||||
| `${{AUTHOR}}` | Author creating and opening the pull request. |
|
||||
| `${{LABELS}}` | The labels associated with this pull request, joined by `,`. |
|
||||
| `${{MILESTONE}}` | Milestone this PR was part of, as assigned on GitHub. |
|
||||
| `${{BODY}}` | Description/Body of the pull request as specified on GitHub. |
|
||||
| `${{ASSIGNEES}}` | Login names of assigned GitHub users, joined by `,`. |
|
||||
| `${{REVIEWERS}}` | GitHub Login names of specified reviewers, joined by `,`. Requires `fetchReviewers` to be enabled. |
|
||||
| `${{APPROVERS}}` | GitHub Login names of users who approved the PR, joined by `,` |
|
||||
| `${{APPROVERS}}` | GitHub Login names of users who approved the PR, joined by `,`. |
|
||||
|
||||
|
||||
<details><summary><b>Array Placeholders</b></summary>
|
||||
<p>
|
||||
|
||||
Table of special array placeholders allowed to be used in the `pr_template` configuration.
|
||||
|
||||
Array placeholders follow the following format: `(KEY)[(*/index)]` for example: `ASSIGNEES[*]` or `ASSIGNEES[0]`.
|
||||
When using `*` values are joined by `,`.
|
||||
|
||||
| **Placeholder** | **Description** |
|
||||
|---------------------|-------------------------------------------------------------------------------------|
|
||||
| `${{ASSIGNEES[*]}}` | Login names of assigned GitHub users. |
|
||||
| `${{REVIEWERS[*]}}` | GitHub Login names of specified reviewers. Requires `fetchReviewers` to be enabled. |
|
||||
| `${{APPROVERS[*]}}` | GitHub Login names of users who approved the PR. |
|
||||
|
||||
Additionally there is a special array placeholder `REVIEWS` which allows access to it's properties:
|
||||
`(KEY)[(*/index)].(property)` for example: `REVIEWS[*].author` or `REVIEWS[*].body`
|
||||
|
||||
| **Placeholder** | **Description** |
|
||||
|-------------------------------|--------------------------------------------|
|
||||
| `${{REVIEWS[*].author}}` | GitHub Login names of specified reviewers. |
|
||||
| `${{REVIEWS[*].body}}` | The body of the review. |
|
||||
| `${{REVIEWS[*].htmlURL}}` | The URL to the given review. |
|
||||
| `${{REVIEWS[*].submittedAt}}` | The date whent he review was submitted. |
|
||||
| `${{REVIEWS[*].state}}` | The state of the given review. |
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
### Template placeholders
|
||||
|
||||
@@ -395,7 +426,7 @@ Table of descriptions for the `configuration.json` options to configure the resu
|
||||
| category.rules | An array of `rules` used to match PRs against. Any match will include the PR. (See `exhaustive` to change this) |
|
||||
| category.rules.pattern | A `regex` pattern to match the property value towards. Uses `RegExp.test("val")` |
|
||||
| category.rules.flags | Defines the regex flags specified for the pattern. Default: `gu`. |
|
||||
| category.rules.on_property | The PR property to match against. [Possible values](https://github.com/mikepenz/release-changelog-builder-action/blob/feature/category_rules/src/configuration.ts#L33-L43). |
|
||||
| category.rules.on_property | The PR property to match against. [Possible values](https://github.com/mikepenz/release-changelog-builder-action/blob/develop/src/configuration.ts#L33-L43). |
|
||||
| ignore_labels | An array of labels, to match pull request labels against. If any PR label overlaps, the pull request will be ignored from the changelog. This takes precedence over category labels |
|
||||
| sort | A `sort` specification, offering the ability to define sort order and property. |
|
||||
| sort.order | The sort order. Allowed values: `ASC`, `DESC` |
|
||||
@@ -455,7 +486,7 @@ Custom placeholders can be defined via the `configuration.json` as `custom_place
|
||||
This example will look for JIRA tickets in the EPIC project, and extract all of these tickets. The exciting part for that case is, that the ticket is PR bound, but can be used in the global TEMPLATE, but equally also in the PR template. This is unique for CUSTOM PLACEHOLDERS as standard palceholders do not offer this functionality.
|
||||
|
||||
| **Input** | **Description** |
|
||||
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|---------------------------------|------------------------------------------------------------------------------------------------------------------------------|
|
||||
| custom_placeholders | An array of `Placeholder` specifications, offering a flexible API to extract custom placeholders from existing placeholders. |
|
||||
| custom_placeholders.name | The name of the custom placeholder. Will be used within the template. |
|
||||
| custom_placeholders.source | The source PLACEHOLDER, requires to be one of the existing Template or PR Template placeholders. |
|
||||
|
||||
Reference in New Issue
Block a user