summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Guido <dan@trailofbits.com>2026-02-15 15:11:45 -0500
committerDan Guido <dan@trailofbits.com>2026-02-15 15:11:45 -0500
commit1ffab01dbc000bc8a6795dca8ab9c1ac1b0a99b7 (patch)
tree178c62abb9137e2f6e741272d388df95bf3eccad
parent1037deed6ad59699181d07877dd13af180fde7ee (diff)
Fix shallow clone breaking git history and contributor countimport/coderabbit-config-generator
Remove --depth=1 so git log has full history for commit analysis. Use GitHub API for contributor count instead of local git log. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-rwxr-xr-xplugins/repo-profiler/skills/repo-profiler/scripts/fetch_repo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/repo-profiler/skills/repo-profiler/scripts/fetch_repo.sh b/plugins/repo-profiler/skills/repo-profiler/scripts/fetch_repo.sh
index bbb82cd..ba55f35 100755
--- a/plugins/repo-profiler/skills/repo-profiler/scripts/fetch_repo.sh
+++ b/plugins/repo-profiler/skills/repo-profiler/scripts/fetch_repo.sh
@@ -78,11 +78,11 @@ if [[ -d "${DEST}" ]]; then
exit 1
fi
-gh repo clone "${REPO}" "${DEST}" -- --depth=1 --single-branch
+gh repo clone "${REPO}" "${DEST}" -- --single-branch
# Get repo metadata
DEFAULT_BRANCH=$(git -C "${DEST}" rev-parse --abbrev-ref HEAD)
-CONTRIBUTOR_COUNT=$(git -C "${DEST}" log --format="%aN" | sort -u | wc -l | tr -d ' ')
+CONTRIBUTOR_COUNT=$(gh api "repos/${REPO}/contributors" --jq 'length' 2>/dev/null || echo "0")
FILE_COUNT=$(find "${DEST}" -type f -not -path "${DEST}/.git/*" | wc -l | tr -d ' ')
# Print manifest as JSON