remove: appending globstar pattern for directories to prevent bugs with path matching (#1670)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack
2023-10-25 21:35:54 -06:00
committed by GitHub
parent d898dd09e4
commit 3ce5a2970f
4 changed files with 7 additions and 40 deletions

View File

@@ -1008,23 +1008,7 @@ export const getFilePatterns = async ({
core.debug(`Input file patterns: ${filePatterns}`)
return filePatterns
.trim()
.split('\n')
.filter(Boolean)
.map(pattern => {
if (pattern.endsWith('/')) {
return `${pattern}**`
} else {
const pathParts = pattern.split('/')
const lastPart = pathParts[pathParts.length - 1]
if (!lastPart.includes('.') && !lastPart.endsWith('*')) {
return `${pattern}/**`
} else {
return pattern
}
}
})
return filePatterns.trim().split('\n').filter(Boolean)
}
// Example YAML input: