Skip to content

Commit 136bd75

Browse files
committed
Handle Copilot review feedback
1 parent 2f8a2a5 commit 136bd75

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

lib/modules/repo_workflows.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,23 @@ dev_kit_repo_entrypoint_source() {
2828

2929
dev_kit_repo_gap_count() {
3030
local repo_dir="$1"
31+
local factor=""
32+
local status=""
33+
local gap_count=0
34+
35+
while IFS= read -r factor; do
36+
[ -n "$factor" ] || continue
37+
status="$(dev_kit_repo_factor_status "$repo_dir" "$factor")"
38+
case "$status" in
39+
missing|partial)
40+
gap_count=$((gap_count + 1))
41+
;;
42+
esac
43+
done <<EOF
44+
$(dev_kit_repo_factor_ids)
45+
EOF
3146

32-
dev_kit_repo_factor_summary_json "$repo_dir" | jq -r '
33-
to_entries
34-
| map(select(.value.status == "missing" or .value.status == "partial"))
35-
| length
36-
' 2>/dev/null || printf '0'
47+
printf '%s' "$gap_count"
3748
}
3849

3950
dev_kit_repo_workflow_status() {

tests/real-repos.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,13 @@ require_jq() {
9999
}
100100

101101
report_name_for_repo() {
102-
basename "$1" | tr -c 'A-Za-z0-9._-' '-'
102+
local repo_path="$1"
103+
local safe_path=""
104+
local path_hash=""
105+
106+
safe_path="$(printf '%s' "$repo_path" | tr -c 'A-Za-z0-9._-' '-')"
107+
path_hash="$(printf '%s' "$repo_path" | cksum | awk '{ print $1 }')"
108+
printf '%s-%s' "$safe_path" "$path_hash"
103109
}
104110

105111
print_check_summary() {

0 commit comments

Comments
 (0)