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 4444 # Extract words from CODEOWNERS that start with @ and convert them into a comma-separated string
4545 # ie, "-author:spier -author:zkoppert"
4646 # 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' ' ')
4848
4949 # Print usernames to terminal for easy debugging
5050 echo "CODEOWNERS_FILTER: $CODEOWNERS_FILTER"
8989
9090 - name : Check out the code so we can get the CODEOWNERS names
9191 uses : actions/checkout@v4
92+ with :
93+ sparse-checkout : |
94+ .github/CODEOWNERS
95+ sparse-checkout-cone-mode : false
9296
9397 - name : Get usernames from CODEOWNERS file
9498 shell : bash
99103 # Extract words from CODEOWNERS that start with @ and convert them into a comma-separated string
100104 # ie, "-author:spier -author:zkoppert"
101105 # 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' ' ')
103107
104108 # Print usernames to terminal for easy debugging
105109 echo "CODEOWNERS_FILTER: $CODEOWNERS_FILTER"
You can’t perform that action at this time.
0 commit comments