Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(post-upgrade-tasks)!: enable dot option for file filters #21282

Merged
merged 3 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2420,6 +2420,7 @@ You can use variable templating in your commands if [`allowPostUpgradeCommandTem
### fileFilters

A list of glob-style matchers that determine which files will be included in the final commit made by Renovate.
Dotfiles are included.

### executionMode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function postUpgradeCommandsExecutor(

for (const relativePath of status.modified.concat(status.not_added)) {
for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) {
if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug(
{ file: relativePath, pattern },
'Post-upgrade file saved'
Expand Down Expand Up @@ -134,7 +134,7 @@ export async function postUpgradeCommandsExecutor(

for (const relativePath of status.deleted || []) {
for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) {
if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug(
{ file: relativePath, pattern },
'Post-upgrade file removed'
Expand Down