feat: git commit related
This commit is contained in:
parent
7ef16c5e95
commit
9983b1dd0a
272
README_interactive_script.md
Normal file
272
README_interactive_script.md
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
# 🚀 Interactive GitHub User Removal Script
|
||||||
|
|
||||||
|
An intuitive, guided script that walks you through the process of removing users from GitHub repositories with a beautiful interactive interface.
|
||||||
|
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
### 🎯 Interactive Experience
|
||||||
|
- **Beautiful Welcome Screen** with ASCII art
|
||||||
|
- **Step-by-step Guided Process** - no command line arguments needed
|
||||||
|
- **Smart Input Validation** with helpful error messages
|
||||||
|
- **Confirmation Prompts** to prevent accidental operations
|
||||||
|
- **Real-time Progress Updates** with visual progress bars
|
||||||
|
|
||||||
|
### 🛡️ Safety Features
|
||||||
|
- **Dry Run Mode** (recommended first run) - preview changes without executing
|
||||||
|
- **Multiple Confirmation Steps** for destructive operations
|
||||||
|
- **Token Validation** before proceeding
|
||||||
|
- **Pattern Preview** to show what repositories will match
|
||||||
|
|
||||||
|
### 🎨 User Interface
|
||||||
|
- **Color-coded Output** for easy reading
|
||||||
|
- **Emoji Icons** for visual clarity
|
||||||
|
- **Formatted Headers** and sections
|
||||||
|
- **Clear Success/Error Messages**
|
||||||
|
|
||||||
|
## 📋 Requirements
|
||||||
|
|
||||||
|
- `bash` (version 4.0+)
|
||||||
|
- `curl`
|
||||||
|
- `jq`
|
||||||
|
- Valid GitHub Personal Access Token with `repo` and `admin:org` permissions
|
||||||
|
|
||||||
|
## 🚀 Usage
|
||||||
|
|
||||||
|
Simply run the script - no command line arguments needed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./remove_user_guided.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The script will guide you through each step:
|
||||||
|
|
||||||
|
### 1. 🔑 GitHub Authentication
|
||||||
|
```
|
||||||
|
🔑 GitHub Authentication
|
||||||
|
============================================================
|
||||||
|
Please provide your GitHub Personal Access Token:
|
||||||
|
💡 The token should have 'repo' and 'admin:org' permissions
|
||||||
|
💡 You can create one at: https://github.com/settings/tokens
|
||||||
|
|
||||||
|
🔐 Enter your GitHub token: [hidden input]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 👤 Target Organization/User
|
||||||
|
```
|
||||||
|
👤 Target Organization/User
|
||||||
|
============================================================
|
||||||
|
Enter the GitHub username or organization name:
|
||||||
|
💡 This is where we'll look for repositories
|
||||||
|
💡 Examples: 'mycompany', 'john-doe', 'my-organization'
|
||||||
|
|
||||||
|
🏢 Organization/Username:
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. 🎯 User to Remove
|
||||||
|
```
|
||||||
|
🎯 User to Remove
|
||||||
|
============================================================
|
||||||
|
Enter the username you want to remove from repositories:
|
||||||
|
💡 This user will be removed as a collaborator from matching repositories
|
||||||
|
💡 They will lose access to private repositories (if applicable)
|
||||||
|
|
||||||
|
👤 Username to remove:
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. 📁 Repository Filter
|
||||||
|
```
|
||||||
|
📁 Repository Filter
|
||||||
|
============================================================
|
||||||
|
Enter a repository name pattern to filter repositories:
|
||||||
|
💡 Pattern examples:
|
||||||
|
• '*' - All repositories
|
||||||
|
• 'myproject-' - Repos starting with 'myproject-'
|
||||||
|
• '*api*' - Repos containing 'api'
|
||||||
|
• 'web-app' - Repos starting with 'web-app'
|
||||||
|
|
||||||
|
🔍 Repository pattern:
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. ⚙️ Operation Options
|
||||||
|
```
|
||||||
|
⚙️ Operation Options
|
||||||
|
============================================================
|
||||||
|
Choose your operation mode:
|
||||||
|
|
||||||
|
1) 🔍 Dry Run - Preview what would be done (Recommended)
|
||||||
|
2) 🚀 Execute - Perform the actual removal
|
||||||
|
|
||||||
|
Select option (1 or 2):
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. 📋 Final Summary
|
||||||
|
```
|
||||||
|
📋 Operation Summary
|
||||||
|
============================================================
|
||||||
|
Configuration:
|
||||||
|
🏢 Organization/User: myorg
|
||||||
|
👤 User to remove: olduser
|
||||||
|
🔍 Repository pattern: project-*
|
||||||
|
⚙️ Mode: Dry Run
|
||||||
|
📝 Logging: Standard
|
||||||
|
|
||||||
|
Ready to proceed? (yes/no):
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎭 Interactive Flow Example
|
||||||
|
|
||||||
|
Here's what a complete session looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
╔══════════════════════════════════════════════════════════╗
|
||||||
|
║ ║
|
||||||
|
║ 🚀 GitHub User Removal Tool 🚀 ║
|
||||||
|
║ ║
|
||||||
|
║ Remove users from repositories with ease! ║
|
||||||
|
║ ║
|
||||||
|
╚══════════════════════════════════════════════════════════╝
|
||||||
|
|
||||||
|
ℹ️ Welcome to the Interactive GitHub User Removal Script!
|
||||||
|
|
||||||
|
🔑 GitHub Authentication
|
||||||
|
============================================================
|
||||||
|
[Token input and validation...]
|
||||||
|
|
||||||
|
👤 Target Organization/User
|
||||||
|
============================================================
|
||||||
|
[Organization selection...]
|
||||||
|
|
||||||
|
🎯 User to Remove
|
||||||
|
============================================================
|
||||||
|
[User selection with confirmation...]
|
||||||
|
|
||||||
|
📁 Repository Filter
|
||||||
|
============================================================
|
||||||
|
[Pattern selection with preview...]
|
||||||
|
|
||||||
|
⚙️ Operation Options
|
||||||
|
============================================================
|
||||||
|
[Mode selection...]
|
||||||
|
|
||||||
|
📋 Operation Summary
|
||||||
|
============================================================
|
||||||
|
[Final confirmation...]
|
||||||
|
|
||||||
|
🚀 Processing Repositories
|
||||||
|
============================================================
|
||||||
|
ℹ️ Discovering repositories for myorg...
|
||||||
|
✅ Found 25 repositories
|
||||||
|
ℹ️ Filtering repositories by pattern 'project-*'...
|
||||||
|
✅ Found 8 repositories matching pattern 'project-*'
|
||||||
|
ℹ️ Processing repositories...
|
||||||
|
|
||||||
|
Progress: [100%] 8/8 repositories processed
|
||||||
|
[DRY RUN] Would remove olduser from myorg/project-api
|
||||||
|
[DRY RUN] Would remove olduser from myorg/project-web
|
||||||
|
|
||||||
|
🎉 Operation Complete
|
||||||
|
============================================================
|
||||||
|
📊 Statistics:
|
||||||
|
📁 Repositories scanned: 25
|
||||||
|
🔍 Repositories matching pattern: 8
|
||||||
|
👤 Repositories where user was collaborator: 2
|
||||||
|
|
||||||
|
✅ Successful removals: 0
|
||||||
|
ℹ️ Already removed: 0
|
||||||
|
❌ Failed removals: 0
|
||||||
|
|
||||||
|
⚠️ This was a dry run - no actual changes were made
|
||||||
|
💡 To perform the actual removal, run the script again and select 'Execute' mode
|
||||||
|
|
||||||
|
🙏 Thank you for using the GitHub User Removal Tool!
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛡️ Safety Features in Detail
|
||||||
|
|
||||||
|
### 1. **Token Validation**
|
||||||
|
- Validates GitHub token before any operations
|
||||||
|
- Shows authenticated username for confirmation
|
||||||
|
- Provides clear error messages for invalid tokens
|
||||||
|
|
||||||
|
### 2. **Input Validation**
|
||||||
|
- Validates username/organization formats
|
||||||
|
- Checks repository pattern syntax
|
||||||
|
- Provides helpful suggestions for corrections
|
||||||
|
|
||||||
|
### 3. **Confirmation Steps**
|
||||||
|
- Confirms user to be removed
|
||||||
|
- Confirms repository pattern understanding
|
||||||
|
- Requires explicit "YES" for destructive operations
|
||||||
|
|
||||||
|
### 4. **Dry Run Mode (Recommended)**
|
||||||
|
- Shows exactly what would be done
|
||||||
|
- No actual changes made
|
||||||
|
- Perfect for testing and verification
|
||||||
|
|
||||||
|
### 5. **Pattern Preview**
|
||||||
|
- Shows what the pattern will match before execution
|
||||||
|
- Examples: "This will match repositories starting with: project-"
|
||||||
|
- Helps prevent unintended scope
|
||||||
|
|
||||||
|
## 🔧 Repository Patterns
|
||||||
|
|
||||||
|
| Pattern | What it Matches | Examples |
|
||||||
|
|---------|-----------------|----------|
|
||||||
|
| `*` | All repositories | All repos in the org/user |
|
||||||
|
| `bytelyst-` | Repos starting with 'bytelyst-' | `bytelyst-web`, `bytelyst-api`, `bytelyst-mobile` |
|
||||||
|
| `*api*` | Repos containing 'api' | `web-api`, `user-api-v2`, `api-gateway` |
|
||||||
|
| `web-*` | Repos starting with 'web-' | `web-frontend`, `web-backend`, `web-app` |
|
||||||
|
| `*-service` | Repos ending with '-service' | `user-service`, `auth-service` |
|
||||||
|
|
||||||
|
## 🎨 Color Coding
|
||||||
|
|
||||||
|
The script uses intuitive color coding:
|
||||||
|
|
||||||
|
- 🔵 **Blue**: Informational messages and prompts
|
||||||
|
- 🟢 **Green**: Success messages and confirmations
|
||||||
|
- 🟡 **Yellow**: Warnings and important notices
|
||||||
|
- 🔴 **Red**: Errors and failures
|
||||||
|
- 🟣 **Purple**: Section headers
|
||||||
|
- 🟦 **Cyan**: Progress updates and statistics
|
||||||
|
|
||||||
|
## 🚨 Important Notes
|
||||||
|
|
||||||
|
1. **Always start with Dry Run mode** to preview changes
|
||||||
|
2. **Double-check the user to remove** - there's no undo!
|
||||||
|
3. **Verify repository patterns** match your intentions
|
||||||
|
4. **Ensure your token has sufficient permissions**
|
||||||
|
5. **Users will lose access to private repositories** immediately
|
||||||
|
|
||||||
|
## 💡 Tips for Best Experience
|
||||||
|
|
||||||
|
1. **Have your GitHub token ready** before starting
|
||||||
|
2. **Know the exact username** you want to remove
|
||||||
|
3. **Think about the repository pattern** beforehand
|
||||||
|
4. **Use Dry Run first** to verify everything looks correct
|
||||||
|
5. **Keep the terminal window** large enough for the interface
|
||||||
|
|
||||||
|
## 🔗 Quick Start Guide
|
||||||
|
|
||||||
|
1. **Prepare**: Get your GitHub token with proper permissions
|
||||||
|
2. **Run**: Execute `./remove_user_guided.sh`
|
||||||
|
3. **Follow**: The interactive prompts step by step
|
||||||
|
4. **Preview**: Always do a dry run first
|
||||||
|
5. **Execute**: Run again in execute mode if satisfied
|
||||||
|
|
||||||
|
## ⚡ Keyboard Shortcuts
|
||||||
|
|
||||||
|
- `Ctrl+C`: Cancel operation at any time
|
||||||
|
- `Enter`: Confirm current input
|
||||||
|
- Arrow keys work in most terminals for command history
|
||||||
|
|
||||||
|
## 🆘 Need Help?
|
||||||
|
|
||||||
|
The script provides comprehensive help at each step:
|
||||||
|
- Clear explanations for each input
|
||||||
|
- Examples for common patterns
|
||||||
|
- Helpful error messages
|
||||||
|
- Recovery suggestions
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Ready to clean up your repositories? Just run `./remove_user_guided.sh` and let the script guide you!** 🚀
|
||||||
194
README_remove_user_script.md
Normal file
194
README_remove_user_script.md
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
# GitHub User Removal Script
|
||||||
|
|
||||||
|
A comprehensive script to remove a specified user from all repositories matching a prefix pattern under a given GitHub username or organization.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- ✅ **Flexible Filtering**: Support for various repository prefix patterns including wildcards
|
||||||
|
- ✅ **Dry Run Mode**: Test operations without making actual changes
|
||||||
|
- ✅ **Verbose Logging**: Detailed output for debugging and monitoring
|
||||||
|
- ✅ **Progress Tracking**: Real-time progress updates during processing
|
||||||
|
- ✅ **Error Handling**: Robust error handling with detailed HTTP status reporting
|
||||||
|
- ✅ **Statistics**: Comprehensive summary of operations performed
|
||||||
|
- ✅ **Auto-detection**: Automatically detects if the root is a user or organization
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- `bash` (version 4.0+)
|
||||||
|
- `curl`
|
||||||
|
- `jq`
|
||||||
|
- Valid GitHub Personal Access Token with `repo` and `admin:org` permissions
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./remove_user_from_repos.sh -t TOKEN -r ROOT_USER -u USER_TO_REMOVE -p REPO_PREFIX [OPTIONS]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
| Parameter | Description |
|
||||||
|
|-----------|-------------|
|
||||||
|
| `-t, --token TOKEN` | GitHub Personal Access Token |
|
||||||
|
| `-r, --root ROOT_USER` | Root GitHub username or organization |
|
||||||
|
| `-u, --user USER_TO_REMOVE` | Username to remove from repositories |
|
||||||
|
| `-p, --prefix REPO_PREFIX` | Repository name prefix pattern |
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
| Parameter | Description |
|
||||||
|
|-----------|-------------|
|
||||||
|
| `-d, --dry-run` | Show what would be done without making changes |
|
||||||
|
| `-v, --verbose` | Enable verbose logging |
|
||||||
|
| `-h, --help` | Show help message |
|
||||||
|
|
||||||
|
## Repository Prefix Patterns
|
||||||
|
|
||||||
|
| Pattern | Description | Example Matches |
|
||||||
|
|---------|-------------|-----------------|
|
||||||
|
| `"bytelyst-"` | Repos starting with 'bytelyst-' | `bytelyst-web`, `bytelyst-api` |
|
||||||
|
| `"*api*"` | Repos containing 'api' | `web-api`, `api-service`, `my-api-v2` |
|
||||||
|
| `"*"` | All repositories | All repos in the organization/user |
|
||||||
|
| `"web-app"` | Repos starting with 'web-app' | `web-app-frontend`, `web-app-v2` |
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### 1. Remove user from all repositories starting with 'bytelyst-'
|
||||||
|
```bash
|
||||||
|
export GITHUB_TOKEN="your_token_here"
|
||||||
|
./remove_user_from_repos.sh -t "$GITHUB_TOKEN" -r "saravanakumardb" -u "i-ayushh18" -p "bytelyst-"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Dry run - Remove user from all repositories (preview mode)
|
||||||
|
```bash
|
||||||
|
./remove_user_from_repos.sh -t "$GITHUB_TOKEN" -r "myorg" -u "olduser" -p "*" --dry-run
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Remove user with verbose logging
|
||||||
|
```bash
|
||||||
|
./remove_user_from_repos.sh -t "$GITHUB_TOKEN" -r "myorg" -u "olduser" -p "project-" --verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Remove user from repositories containing 'api'
|
||||||
|
```bash
|
||||||
|
./remove_user_from_repos.sh -t "$GITHUB_TOKEN" -r "myorg" -u "developer123" -p "*api*"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Output Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
GitHub User Removal Script
|
||||||
|
============================================================
|
||||||
|
ℹ️ Root user/organization: saravanakumardb
|
||||||
|
ℹ️ User to remove: i-ayushh18
|
||||||
|
ℹ️ Repository prefix: bytelyst-
|
||||||
|
✅ Token validated (authenticated as: saravanakumardb)
|
||||||
|
|
||||||
|
Repository Discovery
|
||||||
|
============================================================
|
||||||
|
✅ Found 23 repositories
|
||||||
|
|
||||||
|
Filtering Repositories
|
||||||
|
============================================================
|
||||||
|
✅ Found 4 repositories matching prefix 'bytelyst-'
|
||||||
|
|
||||||
|
Processing Repositories
|
||||||
|
============================================================
|
||||||
|
Progress: [100%] 4/4 repositories processed
|
||||||
|
✅ Successfully removed i-ayushh18 from saravanakumardb/bytelyst-web-app
|
||||||
|
|
||||||
|
Operation Summary
|
||||||
|
============================================================
|
||||||
|
Repositories scanned: 23
|
||||||
|
Repositories matching prefix: 4
|
||||||
|
Repositories where user was collaborator: 1
|
||||||
|
|
||||||
|
Successful removals: 1
|
||||||
|
Already removed: 0
|
||||||
|
Failed removals: 0
|
||||||
|
Success rate: 100%
|
||||||
|
|
||||||
|
✅ Operation completed successfully!
|
||||||
|
```
|
||||||
|
|
||||||
|
## Creating GitHub Token
|
||||||
|
|
||||||
|
1. Go to GitHub → Settings → Developer Settings → Personal Access Tokens → Fine-grained tokens
|
||||||
|
2. Click "Generate new token"
|
||||||
|
3. Select the required permissions:
|
||||||
|
- `repo` (Full control of private repositories)
|
||||||
|
- `admin:org` (Full control of orgs and teams)
|
||||||
|
4. Set appropriate expiration date
|
||||||
|
5. Generate and copy the token
|
||||||
|
|
||||||
|
## Security Best Practices
|
||||||
|
|
||||||
|
- Store tokens as environment variables: `export GITHUB_TOKEN="your_token"`
|
||||||
|
- Never commit tokens to version control
|
||||||
|
- Use fine-grained tokens with minimal required permissions
|
||||||
|
- Regularly rotate tokens
|
||||||
|
- Use `--dry-run` first to verify operations
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
The script handles various error scenarios:
|
||||||
|
|
||||||
|
- **Invalid tokens**: Authentication validation before operations
|
||||||
|
- **Missing repositories**: Graceful handling of non-existent repos
|
||||||
|
- **Insufficient permissions**: Clear error messages for access issues
|
||||||
|
- **Network issues**: Retry logic for transient failures
|
||||||
|
- **Invalid users/orgs**: Proper detection and error reporting
|
||||||
|
|
||||||
|
## Exit Codes
|
||||||
|
|
||||||
|
- `0`: Success - All operations completed successfully
|
||||||
|
- `1`: Failure - One or more operations failed (details in summary)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Common Issues
|
||||||
|
|
||||||
|
1. **"Invalid or expired GitHub token"**
|
||||||
|
- Check token validity
|
||||||
|
- Ensure token has required permissions
|
||||||
|
|
||||||
|
2. **"Access forbidden for repository"**
|
||||||
|
- Token may lack admin permissions for the repository
|
||||||
|
- Repository may be archived or have restricted access
|
||||||
|
|
||||||
|
3. **"Could not fetch repositories"**
|
||||||
|
- User/organization name may be incorrect
|
||||||
|
- Token may lack appropriate access
|
||||||
|
|
||||||
|
### Debug Mode
|
||||||
|
|
||||||
|
Use `--verbose` flag to see detailed operation logs:
|
||||||
|
```bash
|
||||||
|
./remove_user_from_repos.sh -t "$TOKEN" -r "user" -u "target" -p "*" -v
|
||||||
|
```
|
||||||
|
|
||||||
|
## Integration Examples
|
||||||
|
|
||||||
|
### CI/CD Pipeline
|
||||||
|
```yaml
|
||||||
|
- name: Remove user from repositories
|
||||||
|
run: |
|
||||||
|
./remove_user_from_repos.sh \
|
||||||
|
-t "${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
-r "${{ vars.ORG_NAME }}" \
|
||||||
|
-u "${{ vars.USER_TO_REMOVE }}" \
|
||||||
|
-p "${{ vars.REPO_PREFIX }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Batch Processing
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
users=("user1" "user2" "user3")
|
||||||
|
for user in "${users[@]}"; do
|
||||||
|
./remove_user_from_repos.sh -t "$TOKEN" -r "myorg" -u "$user" -p "*"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This script is provided as-is for repository management purposes. Use responsibly and ensure you have appropriate permissions before running in production environments.
|
||||||
160
check_i_ayushh18_collaborator.sh
Executable file
160
check_i_ayushh18_collaborator.sh
Executable file
@ -0,0 +1,160 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to check if i-ayushh18 is a collaborator on repositories
|
||||||
|
# Uses accounts.json for authentication tokens
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Color definitions
|
||||||
|
readonly RED='\033[0;31m'
|
||||||
|
readonly GREEN='\033[0;32m'
|
||||||
|
readonly YELLOW='\033[1;33m'
|
||||||
|
readonly BLUE='\033[0;34m'
|
||||||
|
readonly CYAN='\033[0;36m'
|
||||||
|
readonly BOLD='\033[1m'
|
||||||
|
readonly NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
USER_TO_CHECK="i-ayushh18"
|
||||||
|
REPOS_FILE="repos.txt"
|
||||||
|
ACCOUNTS_FILE="accounts.json"
|
||||||
|
|
||||||
|
# Function to log messages
|
||||||
|
log_info() {
|
||||||
|
echo -e "${BLUE}ℹ️ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_success() {
|
||||||
|
echo -e "${GREEN}✅ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_warning() {
|
||||||
|
echo -e "${YELLOW}⚠️ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_error() {
|
||||||
|
echo -e "${RED}❌ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_header() {
|
||||||
|
echo -e "\n${BOLD}${CYAN}$1${NC}"
|
||||||
|
echo -e "${CYAN}$(printf '=%.0s' {1..60})${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check required files
|
||||||
|
if [[ ! -f "$REPOS_FILE" ]]; then
|
||||||
|
log_error "Repository list file '$REPOS_FILE' not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$ACCOUNTS_FILE" ]]; then
|
||||||
|
log_error "Accounts file '$ACCOUNTS_FILE' not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get GitHub token from accounts.json
|
||||||
|
GITHUB_TOKEN=$(jq -r '.[0].token' "$ACCOUNTS_FILE")
|
||||||
|
GITHUB_USER=$(jq -r '.[0].user' "$ACCOUNTS_FILE")
|
||||||
|
|
||||||
|
if [[ -z "$GITHUB_TOKEN" || "$GITHUB_TOKEN" == "null" ]]; then
|
||||||
|
log_error "Could not extract GitHub token from accounts.json"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log_info "Using GitHub account: $GITHUB_USER"
|
||||||
|
|
||||||
|
# Function to check if user is a collaborator on a repository
|
||||||
|
check_collaboration() {
|
||||||
|
local repo="$1"
|
||||||
|
|
||||||
|
# Validate repository name format
|
||||||
|
if [[ ! "$repo" =~ ^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$ ]]; then
|
||||||
|
log_warning "Invalid repository name format: $repo"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local response
|
||||||
|
response=$(curl -s -w "%{http_code}" -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
"https://api.github.com/repos/$repo/collaborators/$USER_TO_CHECK")
|
||||||
|
|
||||||
|
local http_code="${response: -3}"
|
||||||
|
|
||||||
|
case "$http_code" in
|
||||||
|
204)
|
||||||
|
return 0 # User is a collaborator
|
||||||
|
;;
|
||||||
|
404)
|
||||||
|
return 1 # User is not a collaborator
|
||||||
|
;;
|
||||||
|
403)
|
||||||
|
log_warning "Access forbidden for $repo - may not have admin permissions"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
401)
|
||||||
|
log_error "Authentication failed - token may be invalid or expired"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log_warning "Failed to check collaboration status for $USER_TO_CHECK on $repo (HTTP: $http_code)"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main execution
|
||||||
|
log_header "Checking collaborator status for $USER_TO_CHECK"
|
||||||
|
|
||||||
|
# Read repositories from file
|
||||||
|
if [[ ! -s "$REPOS_FILE" ]]; then
|
||||||
|
log_error "Repository file '$REPOS_FILE' is empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
collaborator_repos=()
|
||||||
|
total_repos=0
|
||||||
|
checked_repos=0
|
||||||
|
|
||||||
|
# Count total repositories
|
||||||
|
total_repos=$(wc -l < "$REPOS_FILE")
|
||||||
|
log_info "Found $total_repos repositories to check"
|
||||||
|
|
||||||
|
log_header "Checking Repositories"
|
||||||
|
|
||||||
|
# Check each repository
|
||||||
|
while IFS= read -r repo; do
|
||||||
|
# Skip empty lines
|
||||||
|
[[ -z "$repo" ]] && continue
|
||||||
|
|
||||||
|
((checked_repos++))
|
||||||
|
printf "\r${CYAN}Progress: [%3d%%] %d/%d repositories checked${NC}" \
|
||||||
|
$((checked_repos * 100 / total_repos)) "$checked_repos" "$total_repos"
|
||||||
|
|
||||||
|
if check_collaboration "$repo"; then
|
||||||
|
collaborator_repos+=("$repo")
|
||||||
|
echo # New line after progress
|
||||||
|
log_success "$USER_TO_CHECK is a collaborator on: $repo"
|
||||||
|
fi
|
||||||
|
done < "$REPOS_FILE"
|
||||||
|
|
||||||
|
echo # New line after progress
|
||||||
|
|
||||||
|
# Show results
|
||||||
|
log_header "Results Summary"
|
||||||
|
|
||||||
|
if [[ ${#collaborator_repos[@]} -eq 0 ]]; then
|
||||||
|
log_info "✨ $USER_TO_CHECK is not a collaborator on any of the $total_repos repositories checked"
|
||||||
|
echo -e "${GREEN}No repositories found where $USER_TO_CHECK has collaborator access.${NC}"
|
||||||
|
else
|
||||||
|
log_success "$USER_TO_CHECK is a collaborator on ${#collaborator_repos[@]} out of $total_repos repositories:"
|
||||||
|
echo
|
||||||
|
for repo in "${collaborator_repos[@]}"; do
|
||||||
|
echo -e "${YELLOW}• $repo${NC}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Save results to file
|
||||||
|
results_file="collaborator_repos_${USER_TO_CHECK}.txt"
|
||||||
|
printf '%s\n' "${collaborator_repos[@]}" > "$results_file"
|
||||||
|
log_info "Results saved to: $results_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
log_header "Operation Complete"
|
||||||
|
echo -e "${GREEN}Finished checking $total_repos repositories for $USER_TO_CHECK collaborator status${NC}"
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/bytelyst-ds-intern-akhil-Rephrase-Assignment",
|
|
||||||
"saravanakumardb1/bytelyst-micro-service",
|
|
||||||
"saravanakumardb1/bytelyst-notelett-api",
|
|
||||||
"saravanakumardb1/bytelyst-notification-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-users-fastapi"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/bytelyst-minutemaster-web"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
[
|
|
||||||
"ArnabhS/snapscribe-web",
|
|
||||||
"bytelyst-ai/newsletter",
|
|
||||||
"bytelyst-ai/snapscribe-web",
|
|
||||||
"bytelyst-ai/Task-Manager",
|
|
||||||
"bytelyst-ai/zenhustles-web",
|
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"Bytelyst/tapchat-web"
|
|
||||||
]
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/activetracker",
|
|
||||||
"bytelyst-ai/elevatr-mob",
|
|
||||||
"bytelyst-ai/figmatoflutter",
|
|
||||||
"bytelyst-ai/minutemaster",
|
|
||||||
"bytelyst-ai/voiceapp"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/bytelyst-gaslesspad-web"
|
|
||||||
]
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
[
|
|
||||||
"ArnabhS/snapscribe-web",
|
|
||||||
"bytelyst-ai/snapscribe-web",
|
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"abhinaisai2002/bytelyst-mock-interviews-ai-web",
|
|
||||||
"abhinaisai2002/chat.com",
|
|
||||||
"abhinaisai2002/DSA-Prep",
|
|
||||||
"ByteLystAI/bytelyst-micro-services-old-delete-",
|
|
||||||
"saravanakumardb/Abhi-DSA-Prep-2024"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"ByteLystLabs/snap-scribe-mob"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"i-ayushh18/ByteListTask",
|
|
||||||
"saravanakumardb/bytelyst-devopsdash-ayush-assignment",
|
|
||||||
"saravanakumardb/bytelyst-upskillpilot-web",
|
|
||||||
"saravanakumardb1/bytelyst-github-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-skillnest-web-delete"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/BytelystAI_Experiments",
|
|
||||||
"bytelyst-ai/LocalLLMSandboxApp"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"lakshmitulasimandala/Minute-Master-redesign"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/action-guide-portal",
|
|
||||||
"saravanakumardb/bytelyst-launchops-web",
|
|
||||||
"saravanakumardb/bytelyst-nomgap-web"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/vercel-fastapi-deployment_TemplateService"
|
|
||||||
]
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/Cover_letter_generator",
|
|
||||||
"bytelyst-ai/crewai",
|
|
||||||
"bytelyst-ai/prompted-insipiration",
|
|
||||||
"bytelyst-ai/quote_generator",
|
|
||||||
"bytelyst-ai/task-recommendation"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"ByteLystAI/MockInterviewsAI"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
[
|
|
||||||
"bytelyst-ai/photo-album",
|
|
||||||
"bytelyst-ai/timer",
|
|
||||||
"bytelyst-ai/zenhustles-web"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"rougue1/taskify"
|
|
||||||
]
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
[
|
|
||||||
"Bytelyst/tap-chat-backend",
|
|
||||||
"Bytelyst/tapchat-web",
|
|
||||||
"Bytelyst/zh-api",
|
|
||||||
"saravanakumardb/bytelyst-backend-micro-services"
|
|
||||||
]
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
[
|
|
||||||
"abhinaisai2002/bytelyst-mock-interviews-ai-web",
|
|
||||||
"ArnabhS/snapscribe-web",
|
|
||||||
"bytelyst-ai/snap-scribe-web",
|
|
||||||
"bytelyst-ai/snapscribe-web",
|
|
||||||
"bytelyst-ai/vercel-fastapi-deployment_TemplateService",
|
|
||||||
"bytelyst-ai/zenhustles-web",
|
|
||||||
"ByteLyst-Bootstrap-Templates/bytelyst-saas-starter-web",
|
|
||||||
"Bytelyst/tapchat-web",
|
|
||||||
"Bytelyst/zen-hustles-web-secrets",
|
|
||||||
"ByteLystAgents/MyTimeLine",
|
|
||||||
"ByteLystAgents/SnapScribeAI",
|
|
||||||
"ByteLystAgents/teams-welness-ninja-bot",
|
|
||||||
"ByteLystAgents/TeamsTimeKeeperBot",
|
|
||||||
"ByteLystAgents/TeamsTimerTab",
|
|
||||||
"ByteLystAgents/Timer",
|
|
||||||
"ByteLystAI-Svc/bytelyst-apikeymgmt-go-api",
|
|
||||||
"ByteLystAI-Svc/bytelyst-flomonk-fastapi",
|
|
||||||
"ByteLystAI-Svc/bytelyst-helloworld-svc",
|
|
||||||
"ByteLystAI-Svc/bytelyst-notify-go-api",
|
|
||||||
"ByteLystAI-Svc/bytelyst-tapchat-go-api",
|
|
||||||
"ByteLystAI/bytelyst-trading-agents",
|
|
||||||
"ByteLystAI/ByteLystAI_KMP_Mob",
|
|
||||||
"ByteLystAI/IBM_Watcon_Playground",
|
|
||||||
"ByteLystAI/MockInterviewsAI",
|
|
||||||
"ByteLystLabs/bytelyst_commons_fastapi",
|
|
||||||
"ByteLystLabs/bytelyst-vercel-fastapi-template",
|
|
||||||
"ByteLystLabs/bytelyst-worker",
|
|
||||||
"ByteLystLabs/BytelystBots",
|
|
||||||
"ByteLystLabs/diary_dazzle",
|
|
||||||
"ByteLystLabs/gen-ai-service",
|
|
||||||
"ByteLystLabs/limitless",
|
|
||||||
"ByteLystLabs/minute-master-web-delete",
|
|
||||||
"ByteLystLabs/notelett-web",
|
|
||||||
"ByteLystLabs/QRCodeAPPMobile",
|
|
||||||
"ByteLystLabs/redis-queue-processor",
|
|
||||||
"ByteLystLabs/snap-scribe-mob",
|
|
||||||
"ByteLystLabs/UserService",
|
|
||||||
"ByteLystLabs/vaa-ventures-web",
|
|
||||||
"ByteLystLabs/zen_hustles_flutter_mob_delete",
|
|
||||||
"ByteLystLabs/zen_hustles_mob",
|
|
||||||
"ByteLystLabs/zen-hustles-mob-delete",
|
|
||||||
"ByteLystLearning/udemy-webpack",
|
|
||||||
"HolosuitLabs/HoloBot-Chat",
|
|
||||||
"i-ayushh18/ByteListTask",
|
|
||||||
"saravanakumardb/.files",
|
|
||||||
"saravanakumardb/action-guide-portal",
|
|
||||||
"saravanakumardb/amplify-app",
|
|
||||||
"saravanakumardb/bytelyst",
|
|
||||||
"saravanakumardb/bytelyst-alp-ai",
|
|
||||||
"saravanakumardb/bytelyst-azure-ai-toolbox-web",
|
|
||||||
"saravanakumardb/bytelyst-azure-functions",
|
|
||||||
"saravanakumardb/bytelyst-bytelystos",
|
|
||||||
"saravanakumardb/bytelyst-compass4ai-web",
|
|
||||||
"saravanakumardb/bytelyst-dev-productivity-standards",
|
|
||||||
"saravanakumardb/bytelyst-devops-tools",
|
|
||||||
"saravanakumardb/bytelyst-devops-web",
|
|
||||||
"saravanakumardb/bytelyst-ds-intern-akhil-Rephrase-Assignment",
|
|
||||||
"saravanakumardb/bytelyst-dummy1-delete",
|
|
||||||
"saravanakumardb/bytelyst-flomonk-web",
|
|
||||||
"saravanakumardb/bytelyst-heirloom-web",
|
|
||||||
"saravanakumardb/bytelyst-ibm-watson-ai-toolbox-web",
|
|
||||||
"saravanakumardb/bytelyst-infrastructure",
|
|
||||||
"saravanakumardb/bytelyst-liteai-web",
|
|
||||||
"saravanakumardb/bytelyst-nomgap-web",
|
|
||||||
"saravanakumardb/bytelyst-upskillpilot-web",
|
|
||||||
"saravanakumardb/notelett-webapp",
|
|
||||||
"saravanakumardb1/bytelyst_upskillpilot_fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-commons-api",
|
|
||||||
"saravanakumardb1/bytelyst-github-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-micro-service",
|
|
||||||
"saravanakumardb1/bytelyst-nomgap-api",
|
|
||||||
"saravanakumardb1/bytelyst-notelett-api",
|
|
||||||
"saravanakumardb1/bytelyst-notification-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-products-go-api"
|
|
||||||
]
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/bytelyst-ibm-watson-ai-toolbox-web",
|
|
||||||
"saravanakumardb/bytelyst-upskillpilot-web",
|
|
||||||
"saravanakumardb1/bytelyst_upskillpilot_fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-github-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-micro-service",
|
|
||||||
"saravanakumardb1/bytelyst-notelett-mob",
|
|
||||||
"saravanakumardb1/bytelyst-notification-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-tapchat-web"
|
|
||||||
]
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
[
|
|
||||||
"ByteLystAI/bytelyst-trading-agents",
|
|
||||||
"ByteLystLabs/QRCodeAPPMobile",
|
|
||||||
"ByteLystLabs/zen_hustles_flutter_mob_delete",
|
|
||||||
"ByteLystLabs/zen_hustles_mob",
|
|
||||||
"ByteLystLabs/zen-hustles-mob-delete",
|
|
||||||
"saravanakumardb1/bytelyst-notelett-api"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/bytelyst-gaslesspad-web"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-nextjs-starter-app"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/bytelyst-flomonk-web"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
@ -57,6 +57,40 @@ This script attempts to list all repositories a given user has access to, by sca
|
|||||||
./github_access_scripts/list_user_repos.sh <GITHUB_USER_NAME>
|
./github_access_scripts/list_user_repos.sh <GITHUB_USER_NAME>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## GitHub Repository Scanners
|
||||||
|
|
||||||
|
This directory (`github_repo_scanners`) contains scripts for more advanced repository scanning and data extraction.
|
||||||
|
|
||||||
|
### `create_user_repo_lists.sh`
|
||||||
|
|
||||||
|
This script scans all accounts in `accounts.json` and creates a JSON file for each user containing a list of repositories they have access to.
|
||||||
|
|
||||||
|
**Command:**
|
||||||
|
```bash
|
||||||
|
./github_repo_scanners/create_user_repo_lists.sh <path_to_accounts.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
```bash
|
||||||
|
./github_repo_scanners/create_user_repo_lists.sh accounts.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### `create_contributor_repo_lists.sh`
|
||||||
|
|
||||||
|
This script scans all accounts in `accounts.json`, finds all contributors to their repositories, and creates a JSON file for each contributor listing the repositories they have contributed to.
|
||||||
|
|
||||||
|
**Command:**
|
||||||
|
```bash
|
||||||
|
./github_repo_scanners/create_contributor_repo_lists.sh <path_to_accounts.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
```bash
|
||||||
|
./github_repo_scanners/create_contributor_repo_lists.sh accounts.json
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note on File Visibility:** In some environments, tools like `list_directory` or `read_file` within certain CLI agents might experience caching or synchronization issues, leading to files not appearing immediately after creation, even if the underlying shell commands confirm their existence. If you encounter such issues, direct shell commands (`ls`, `cat`) might provide more accurate results.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
./github_access_scripts/list_user_repos.sh DARKenergem
|
./github_access_scripts/list_user_repos.sh DARKenergem
|
||||||
|
|||||||
@ -1,7 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/bytelyst-ds-intern-akhil-Rephrase-Assignment",\n "saravanakumardb1/bytelyst-micro-service",\n "saravanakumardb1/bytelyst-notelett-api",\n "saravanakumardb1/bytelyst-notification-fastapi",\n "saravanakumardb1/bytelyst-users-fastapi"\n]\n
|
||||||
"saravanakumardb/bytelyst-ds-intern-akhil-Rephrase-Assignment",
|
|
||||||
"saravanakumardb1/bytelyst-micro-service",
|
|
||||||
"saravanakumardb1/bytelyst-notelett-api",
|
|
||||||
"saravanakumardb1/bytelyst-notification-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-users-fastapi"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "bytelyst-ai/bytelyst-minutemaster-web"\n]\n
|
||||||
"bytelyst-ai/bytelyst-minutemaster-web"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,8 +1 @@
|
|||||||
[
|
[\n "ArnabhS/snapscribe-web",\n "bytelyst-ai/newsletter",\n "bytelyst-ai/snapscribe-web",\n "bytelyst-ai/Task-Manager",\n "bytelyst-ai/zenhustles-web",\n "saravanakumardb/notelett-webapp"\n]\n
|
||||||
"ArnabhS/snapscribe-web",
|
|
||||||
"bytelyst-ai/newsletter",
|
|
||||||
"bytelyst-ai/snapscribe-web",
|
|
||||||
"bytelyst-ai/Task-Manager",
|
|
||||||
"bytelyst-ai/zenhustles-web",
|
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "Bytelyst/tapchat-web"\n]\n
|
||||||
"Bytelyst/tapchat-web"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,7 +1 @@
|
|||||||
[
|
[\n "bytelyst-ai/activetracker",\n "bytelyst-ai/elevatr-mob",\n "bytelyst-ai/figmatoflutter",\n "bytelyst-ai/minutemaster",\n "bytelyst-ai/voiceapp"\n]\n
|
||||||
"bytelyst-ai/activetracker",
|
|
||||||
"bytelyst-ai/elevatr-mob",
|
|
||||||
"bytelyst-ai/figmatoflutter",
|
|
||||||
"bytelyst-ai/minutemaster",
|
|
||||||
"bytelyst-ai/voiceapp"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/bytelyst-gaslesspad-web"\n]\n
|
||||||
"saravanakumardb/bytelyst-gaslesspad-web"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,5 +1 @@
|
|||||||
[
|
[\n "ArnabhS/snapscribe-web",\n "bytelyst-ai/snapscribe-web",\n "saravanakumardb/notelett-webapp"\n]\n
|
||||||
"ArnabhS/snapscribe-web",
|
|
||||||
"bytelyst-ai/snapscribe-web",
|
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,7 +1 @@
|
|||||||
[
|
[\n "abhinaisai2002/bytelyst-mock-interviews-ai-web",\n "abhinaisai2002/chat.com",\n "abhinaisai2002/DSA-Prep",\n "ByteLystAI/bytelyst-micro-services-old-delete-",\n "saravanakumardb/Abhi-DSA-Prep-2024"\n]\n
|
||||||
"abhinaisai2002/bytelyst-mock-interviews-ai-web",
|
|
||||||
"abhinaisai2002/chat.com",
|
|
||||||
"abhinaisai2002/DSA-Prep",
|
|
||||||
"ByteLystAI/bytelyst-micro-services-old-delete-",
|
|
||||||
"saravanakumardb/Abhi-DSA-Prep-2024"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/aws-mobile-appsync-chat-starter-angular"\n]\n
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/aws-mobile-appsync-chat-starter-angular"\n]\n
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/aws-mobile-appsync-chat-starter-angular"\n]\n
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/aws-mobile-appsync-chat-starter-angular"\n]\n
|
||||||
"saravanakumardb/aws-mobile-appsync-chat-starter-angular"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/notelett-webapp"\n]\n
|
||||||
"saravanakumardb/notelett-webapp"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "ByteLystLabs/snap-scribe-mob"\n]\n
|
||||||
"ByteLystLabs/snap-scribe-mob"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,7 +1 @@
|
|||||||
[
|
[\n "i-ayushh18/ByteListTask",\n "saravanakumardb/bytelyst-devopsdash-ayush-assignment",\n "saravanakumardb/bytelyst-upskillpilot-web",\n "saravanakumardb1/bytelyst-github-fastapi",\n "saravanakumardb1/bytelyst-skillnest-web-delete"\n]\n
|
||||||
"i-ayushh18/ByteListTask",
|
|
||||||
"saravanakumardb/bytelyst-devopsdash-ayush-assignment",
|
|
||||||
"saravanakumardb/bytelyst-upskillpilot-web",
|
|
||||||
"saravanakumardb1/bytelyst-github-fastapi",
|
|
||||||
"saravanakumardb1/bytelyst-skillnest-web-delete"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,4 +1 @@
|
|||||||
[
|
[\n "bytelyst-ai/BytelystAI_Experiments",\n "bytelyst-ai/LocalLLMSandboxApp"\n]\n
|
||||||
"bytelyst-ai/BytelystAI_Experiments",
|
|
||||||
"bytelyst-ai/LocalLLMSandboxApp"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "lakshmitulasimandala/Minute-Master-redesign"\n]\n
|
||||||
"lakshmitulasimandala/Minute-Master-redesign"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/amplify-codegen"\n]\n
|
||||||
"saravanakumardb/amplify-codegen"
|
|
||||||
]
|
|
||||||
|
|||||||
@ -1,5 +1 @@
|
|||||||
[
|
[\n "saravanakumardb/action-guide-portal",\n "saravanakumardb/bytelyst-launchops-web",\n "saravanakumardb/bytelyst-nomgap-web"\n]\n
|
||||||
"saravanakumardb/action-guide-portal",
|
|
||||||
"saravanakumardb/bytelyst-launchops-web",
|
|
||||||
"saravanakumardb/bytelyst-nomgap-web"
|
|
||||||
]
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user