sync-github-projects.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # GrabZilla 2.1 - Sync TODO.md with GitHub Projects
  3. # This script helps sync tasks from TODO.md to GitHub Projects board
  4. set -e
  5. echo "🔄 GitHub Projects Sync Script"
  6. echo "================================"
  7. echo ""
  8. # Check if gh is installed
  9. if ! command -v gh &> /dev/null; then
  10. echo "❌ GitHub CLI (gh) is not installed"
  11. echo "Install it from: https://cli.github.com/"
  12. exit 1
  13. fi
  14. # Check authentication
  15. if ! gh auth status &> /dev/null; then
  16. echo "❌ Not authenticated with GitHub CLI"
  17. echo "Run: gh auth login"
  18. exit 1
  19. fi
  20. # Request additional scopes if needed
  21. echo "📋 Checking GitHub CLI permissions..."
  22. if ! gh project list --owner jopa79 &> /dev/null; then
  23. echo "⚠️ Additional permissions needed"
  24. echo "Running: gh auth refresh -s read:project -s project"
  25. gh auth refresh -s read:project -s project
  26. fi
  27. # Get project number from URL
  28. PROJECT_URL="https://github.com/users/jopa79/projects/2"
  29. PROJECT_NUMBER="2"
  30. OWNER="jopa79"
  31. echo ""
  32. echo "📊 Project: $PROJECT_URL"
  33. echo "👤 Owner: $OWNER"
  34. echo ""
  35. # List current project items
  36. echo "📝 Current project items:"
  37. gh project item-list $PROJECT_NUMBER --owner $OWNER --format json | jq -r '.items[] | " - [\(.status)] \(.title)"' 2>/dev/null || echo " (Unable to fetch - check permissions)"
  38. echo ""
  39. echo "✅ Setup complete!"
  40. echo ""
  41. echo "Next steps:"
  42. echo "1. Review TODO.md priorities that need to be added"
  43. echo "2. Create issues for pending tasks:"
  44. echo " gh issue create --title 'Task Title' --body 'Description' --project $PROJECT_NUMBER"
  45. echo "3. Add existing issues to project:"
  46. echo " gh project item-add $PROJECT_NUMBER --owner $OWNER --url <issue-url>"
  47. echo ""
  48. echo "📄 Current TODO.md summary:"
  49. echo " ✅ Priority 1: Code Management - COMPLETED"
  50. echo " ✅ Priority 2: Testing & Validation - COMPLETED"
  51. echo " ✅ Priority 3: Binary Management - COMPLETED"
  52. echo " ✅ Priority 4: Performance & Parallel Processing - COMPLETED"
  53. echo " ✅ Priority 5: YouTube Enhancements - COMPLETED"
  54. echo " 🟢 Priority 6: Cross-Platform & Build - PENDING"
  55. echo ""