Skip to content

Commit

Permalink
Add support for include-paths override
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Nov 26, 2022
1 parent 6df64e4 commit 517932c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ The Release Drafter GitHub Action accepts a number of optional inputs directly i
| `commitish` | A string specifying the target branch for the release being created. |
| `header` | A string that would be added before the template body. |
| `footer` | A string that would be added after the template body. |
| `include-paths`| An array of paths used to restrict pull requests included in the release notes to only the pull requests that modified any of the paths in this array. Supports files and directories. This will override any `include-paths` specified in your `release-drafter.yml` if defined. |

## Action Outputs

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ inputs:
A boolean indicating whether the autolabeler mode is disabled.
required: false
default: ''
include-paths:
description: |
An array of paths used to restrict pull requests included in the release notes to only the pull requests that modified any of the paths in this array. Supports files and directories.
required: false
outputs:
id:
description: The ID of therelease that was created or updated.
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,19 @@ module.exports = (app, { getRouter }) => {
'tag-prefix': tagPrefix,
} = config

// override header and footer when passed as input
// overrides passed as input
const header = core.getInput('header')
const footer = core.getInput('footer')
const includePaths = core.getInput('include-paths')
if (header) {
config['header'] = header
}
if (footer) {
config['footer'] = footer
}
if (includePaths) {
config['include-paths'] = includePaths
}

const { draftRelease, lastRelease } = await findReleases({
context,
Expand Down

0 comments on commit 517932c

Please sign in to comment.