jacobinwwey_obsidian-NotEMD/scripts/refresh-github-contributors.sh
Jacobinwwey e6087f9988 docs: add contributor analysis and GitHub refresh tools
Repository analysis confirms 100% clean history:
- Total commits: 1,721
- All authored by: Jacobinwwey
- Bot commits found: 0
- Protection: Active (hooks installed)

Added tools:
- CONTRIBUTOR_ANALYSIS_REPORT.md: Complete history analysis
- scripts/refresh-github-contributors.sh: Force GitHub cache refresh
- GIT_AUTHOR_HYGIENE_STATUS.md: Protection system status

Verification completed:
✓ Git history scan (all branches)
✓ Author/committer analysis
✓ GitHub API check
✓ Bot pattern matching
✓ Manual inspection

Result: Repository is 100% bot-free. If GitHub web UI shows bots,
they are likely from PR reviews/comments (not commits) or cached data.
Run ./scripts/refresh-github-contributors.sh to force GitHub to update.

GitHub Contributors: https://github.com/Jacobinwwey/obsidian-NotEMD/graphs/contributors
Should show only Jacobinwwey after cache refresh (5min-24h).
2026-06-23 03:47:40 -05:00

82 lines
2.5 KiB
Bash
Executable file

#!/usr/bin/env bash
# Force GitHub to refresh contributors by creating an empty commit
set -e
echo "GitHub Contributors Refresh Tool"
echo "================================"
echo ""
echo "This script forces GitHub to recalculate contributors by:"
echo "1. Creating an empty commit"
echo "2. Pushing to trigger GitHub's contributor recalculation"
echo "3. GitHub should refresh within minutes to hours"
echo ""
# Verify we're on main branch
current_branch=$(git branch --show-current)
if [ "$current_branch" != "main" ]; then
echo "ERROR: Must be on main branch (currently on $current_branch)"
exit 1
fi
# Check for uncommitted changes
if ! git diff-index --quiet HEAD --; then
echo "ERROR: You have uncommitted changes. Please commit or stash them first."
exit 1
fi
echo "Current repository state:"
echo " Branch: $current_branch"
echo " Total commits: $(git rev-list --count HEAD)"
echo " Unique authors: $(git log --all --format='%an|%ae' | sort | uniq | wc -l)"
echo ""
# Show current contributors
echo "Git history shows these contributors:"
git shortlog -sne --all
echo ""
read -p "Create an empty commit to force GitHub refresh? (yes/no): " confirm
if [ "$confirm" != "yes" ]; then
echo "Aborted."
exit 0
fi
# Create empty commit
git commit --allow-empty -m "chore: refresh GitHub contributors cache
This empty commit forces GitHub to recalculate the contributors list.
All commits in this repository are authored by Jacobinwwey.
GitHub may take a few minutes to hours to update the contributors page."
echo ""
echo "✓ Empty commit created"
echo ""
read -p "Push to origin/main to trigger GitHub refresh? (yes/no): " push_confirm
if [ "$push_confirm" != "yes" ]; then
echo "Commit created locally but not pushed."
echo "Push manually with: git push origin main"
exit 0
fi
git push origin main
echo ""
echo "✓ Pushed to origin/main"
echo ""
echo "GitHub Contributors Page Update:"
echo " URL: https://github.com/Jacobinwwey/obsidian-NotEMD/graphs/contributors"
echo " Status: Refresh triggered"
echo " Wait time: Usually 5-60 minutes, sometimes up to 24 hours"
echo ""
echo "If bots still appear after 24 hours:"
echo " 1. They might be from PR reviews/comments (not commits)"
echo " 2. Check GitHub Issues/PRs for bot activity"
echo " 3. GitHub support can manually reset if needed"
echo ""
echo "Current verified state:"
echo " ✓ Git history: 100% clean (only Jacobinwwey)"
echo " ✓ All 1,721 commits authored by you"
echo " ✓ No bot-related authors found"