Skip to content

Commit fb6f9d2

Browse files
committed
fix: sort and deduplicate OWNERS files in CODEOWNERS generation
1 parent 6859dab commit fb6f9d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/sync-codeowners.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
# Find all OWNERS files and generate CODEOWNERS content
3737
CODEOWNERS_CONTENT="# CODEOWNERS file\n# This file is automatically generated from the OWNERS files in the repository.\n# For more information, see: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners\n\n"
38-
for OWNERS_FILE in $(find . -name 'OWNERS'); do
38+
for OWNERS_FILE in $(find . -name 'OWNERS' | sort -s --ignore-case --unique); do
3939
RELATIVE_PATH=$(dirname "$OWNERS_FILE")
4040
OWNERS=$(cat "$OWNERS_FILE" | xargs -n1 | sed 's/^/@/' | xargs)
4141
CODEOWNERS_CONTENT+="$RELATIVE_PATH/* $OWNERS\n"

0 commit comments

Comments
 (0)