From c7847ef7f704b0b16fd9468e59085d62445339eb Mon Sep 17 00:00:00 2001 From: Matthias Fax Date: Mon, 14 Sep 2020 19:15:38 +0200 Subject: [PATCH] fix: root files are not matched by glob (#19) * fix: root files are not matched by glob * build(test): reflect changed glob in expected --- .github/workflows/build.yml | 6 +++--- entrypoint.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7491ea7..ca426fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,10 @@ jobs: path: .github/CODEOWNERS.test - name: verify contents of generated file (file) run: | - grep -q "^.gitignore matthias.fax@gmail.com$" .github/CODEOWNERS.test + grep -q "^/.gitignore matthias.fax@gmail.com$" .github/CODEOWNERS.test - name: verify contents of generated file (folder) run: | - grep -q "^.github/\* matthias.fax@gmail.com" .github/CODEOWNERS.test + grep -q "^/.github/\* matthias.fax@gmail.com" .github/CODEOWNERS.test - name: verify lack of granularity continue-on-error: true run: | @@ -68,7 +68,7 @@ jobs: - name: verify contents of generated file (folder) continue-on-error: true run: | - grep -q "^.github/* matthias.fax@gmail.com" .github/CODEOWNERS.test + grep -q "^.github/[. \t]*matthias.fax@gmail.com" .github/CODEOWNERS.test echo "::set-env name=folder::success" - name: fail if folder is in owners list if: env.folder == 'success' diff --git a/entrypoint.sh b/entrypoint.sh index 4eb6194..02e4d7b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -37,12 +37,12 @@ owners() { if [ "$?" -eq 0 ]; then if [ -n "$users" ]; then if [ -n "$INPUT_GRANULAR" ]; then - echo "$file $users" + echo "/$file $users" else if echo "$dirs" | grep -w "$file" > /dev/null; then - echo "$file/* $users" + echo "/$file/* $users" else - echo "$file $users" + echo "/$file $users" fi fi fi