Skip to content

Commit 33257a9

Browse files
committed
ci/request-reviews: Fix code owner requests for filenames with spaces
Discovered in NixOS#368656 (comment)
1 parent ce38994 commit 33257a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ci/request-reviews/get-code-owners.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ declare -A users=()
3636
for file in "${touchedFiles[@]}"; do
3737
result=$(codeowners --file "$tmp"/codeowners "$file")
3838

39-
read -r file owners <<< "$result"
39+
# Remove the file prefix and trim the surrounding spaces
40+
read -r owners <<< "${result#"$file"}"
4041
if [[ "$owners" == "(unowned)" ]]; then
4142
log "File $file is unowned"
4243
continue

0 commit comments

Comments
 (0)