diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-23 23:26:52 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-23 23:26:52 +0300 |
| commit | 006724744a943aad877a92406a5e2b4d5d12acd3 (patch) | |
| tree | ce79e6481d3a9ae38bebf3a7acd1d3a7edd520a8 /test/test_codeberg_list.sh | |
| parent | 125e2a2c50bcb3eaa5dfb8802c6de3b2f406b3d2 (diff) | |
Add GitHub repository creation and improve error handling
- Add --create-github-repos flag to automatically create missing GitHub repositories
- Implement GitHub API client with token support from config/env/file
- Add Codeberg API integration to sync all public repositories
- Make sync operations stop on first error for better debugging
- Support GitHub repo creation for all sync commands (--sync, --sync-all, --sync-codeberg-public)
- Add comprehensive error messages and debug logging
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'test/test_codeberg_list.sh')
| -rwxr-xr-x | test/test_codeberg_list.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test_codeberg_list.sh b/test/test_codeberg_list.sh new file mode 100755 index 0000000..d285be6 --- /dev/null +++ b/test/test_codeberg_list.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Test script to list Codeberg public repos without syncing +set -e + +echo "Testing Codeberg API to list public repositories..." + +# Use curl to test the API directly +USER="snonux" +echo "Fetching public repos for user: $USER" + +# Try as user +echo "" +echo "Trying user endpoint..." +curl -s "https://codeberg.org/api/v1/users/$USER/repos?limit=50" | \ + jq -r '.[] | select(.private == false and .fork == false and .archived == false) | .name' | \ + sort + +echo "" +echo "Total public repos (non-fork, non-archived):" +curl -s "https://codeberg.org/api/v1/users/$USER/repos?limit=50" | \ + jq '[.[] | select(.private == false and .fork == false and .archived == false)] | length'
\ No newline at end of file |
