Skip to content

Commit

Permalink
fix: root files are not matched by glob (#19)
Browse files Browse the repository at this point in the history
* fix: root files are not matched by glob

* build(test): reflect changed glob in expected
  • Loading branch information
matfax authored Sep 14, 2020
1 parent 104ae39 commit c7847ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
path: .github/CODEOWNERS.test
- name: verify contents of generated file (file)
run: |
grep -q "^.gitignore [email protected]$" .github/CODEOWNERS.test
grep -q "^/.gitignore [email protected]$" .github/CODEOWNERS.test
- name: verify contents of generated file (folder)
run: |
grep -q "^.github/\* [email protected]" .github/CODEOWNERS.test
grep -q "^/.github/\* [email protected]" .github/CODEOWNERS.test
- name: verify lack of granularity
continue-on-error: true
run: |
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: verify contents of generated file (folder)
continue-on-error: true
run: |
grep -q "^.github/* [email protected]" .github/CODEOWNERS.test
grep -q "^.github/[. \t]*[email protected]" .github/CODEOWNERS.test
echo "::set-env name=folder::success"
- name: fail if folder is in owners list
if: env.folder == 'success'
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c7847ef

Please sign in to comment.