File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 44
44
# Extract words from CODEOWNERS that start with @ and convert them into a comma-separated string
45
45
# ie, "-author:spier -author:zkoppert"
46
46
# This will be used to filter out these codeowners from certain stats in later steps
47
- CODEOWNERS_FILTER=$(echo $CODEOWNERS_FILE | grep -o "@[a-zA-Z0-9\-]*" | sed 's/@/-author:/g' | tr '\n' ' ')
47
+ CODEOWNERS_FILTER=$(echo $CODEOWNERS_FILE | grep -o "@[a-zA-Z0-9\-]*" | sed 's/@/-author:/g' | sort | uniq | tr '\n' ' ')
48
48
49
49
# Print usernames to terminal for easy debugging
50
50
echo "CODEOWNERS_FILTER: $CODEOWNERS_FILTER"
89
89
90
90
- name : Check out the code so we can get the CODEOWNERS names
91
91
uses : actions/checkout@v4
92
+ with :
93
+ sparse-checkout : |
94
+ .github/CODEOWNERS
95
+ sparse-checkout-cone-mode : false
92
96
93
97
- name : Get usernames from CODEOWNERS file
94
98
shell : bash
99
103
# Extract words from CODEOWNERS that start with @ and convert them into a comma-separated string
100
104
# ie, "-author:spier -author:zkoppert"
101
105
# This will be used to filter out these codeowners from certain stats in later steps
102
- CODEOWNERS_FILTER=$(echo $CODEOWNERS_FILE | grep -o "@[a-zA-Z0-9\-]*" | sed 's/@/-author:/g' | tr '\n' ' ')
106
+ CODEOWNERS_FILTER=$(echo $CODEOWNERS_FILE | grep -o "@[a-zA-Z0-9\-]*" | sed 's/@/-author:/g' | sort | uniq | tr '\n' ' ')
103
107
104
108
# Print usernames to terminal for easy debugging
105
109
echo "CODEOWNERS_FILTER: $CODEOWNERS_FILTER"
You can’t perform that action at this time.
0 commit comments