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:
18
src/utils.ts
18
src/utils.ts
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user