feat(healthcheck/forbidden): gitignore in subdir
All checks were successful
build / build (push) Successful in 1m8s
build / trigger-build-image (push) Has been skipped
build / build (pull_request) Successful in 1m9s
build / trigger-build-image (pull_request) Has been skipped

This commit is contained in:
zzjc1234 2024-10-17 18:20:16 +08:00
parent f6012bdd5e
commit 44e3feb5c6

View File

@ -16,7 +16,12 @@ func getForbiddens(root string) ([]string, error) {
var matches []string
// Create a gitignore instance from the .gitignore file
ignore, err := gitignore.NewFromFile(filepath.Join(root, ".gitignore"))
ignore := gitignore.NewRepositoryWithCache(root, ".gitignore", gitignore.NewCache(), func(e gitignore.Error) bool {
return false
})
var err error
if err != nil {
return nil, err
}