Skip to content

Commit

Permalink
feat: add template input
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Oct 24, 2023
1 parent 09c613e commit e2d8e6d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -371,6 +371,7 @@ The Release Drafter GitHub Action accepts a number of optional inputs directly i
| `latest` | A string indicating whether the release being created or updated should be marked as latest. |
| `commitish` | A string specifying the target branch for the release being created. |
| `header` | A string that would be added before the template body. |
| `template` | The template for the body of the release. |
| `footer` | A string that would be added after the template body. |

## Action Outputs
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -58,6 +58,10 @@ inputs:
A string that would be added before the template body.
required: false
default: ''
template:
description: |
The template for the body of the release.
required: false
footer:
description: |
A string that would be added after the template body.
Expand Down
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -269,6 +269,10 @@ function updateConfigFromInput(config, input) {
config.header = input.header
}

if (input.template) {
config.template = input.template
}

if (input.footer) {
config.footer = input.footer
}
Expand Down
2 changes: 2 additions & 0 deletions lib/default-config.js
Expand Up @@ -32,6 +32,8 @@ const DEFAULT_CONFIG = Object.freeze({
commitish: '',
'category-template': `## $TITLE`,
header: '',
template:
"# What's Changed\n$CHANGES\n**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION",
footer: '',
})

Expand Down

0 comments on commit e2d8e6d

Please sign in to comment.