Skip to content

Commit 6e543f4

Browse files
Kamal Sai DevarapalliKamal Sai Devarapalli
authored andcommitted
feat: Add open source repository setup scripts
- Add script to clone 17 open source repositories for contribution - Add random repo picker script - Add contribution tracking documentation - All repos cloned to /Users/alwayskamalsai/CustomProjects
1 parent 2131982 commit 6e543f4

File tree

3 files changed

+196
-0
lines changed

3 files changed

+196
-0
lines changed

scripts/pick_random_repo.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# Pick a random repository to contribute to
3+
4+
REPOS_DIR="/Users/alwayskamalsai/CustomProjects"
5+
6+
if [ ! -d "$REPOS_DIR" ]; then
7+
echo "❌ Repositories directory not found!"
8+
echo "Run scripts/setup_opensource_repos.sh first"
9+
exit 1
10+
fi
11+
12+
# Get list of directories
13+
repos=($(ls -d "$REPOS_DIR"/*/ 2>/dev/null | xargs -n1 basename))
14+
15+
if [ ${#repos[@]} -eq 0 ]; then
16+
echo "❌ No repositories found in $REPOS_DIR"
17+
echo "Run scripts/setup_opensource_repos.sh first"
18+
exit 1
19+
fi
20+
21+
# Pick random repo
22+
random_repo=${repos[$RANDOM % ${#repos[@]}]}
23+
24+
echo "=========================================="
25+
echo "🎲 Random Repository Selected"
26+
echo "=========================================="
27+
echo ""
28+
echo "Repository: $random_repo"
29+
echo "Path: $REPOS_DIR/$random_repo"
30+
echo ""
31+
echo "Next steps:"
32+
echo "1. cd $REPOS_DIR/$random_repo"
33+
echo "2. git checkout -b contribute/$(date +%Y%m%d)"
34+
echo "3. Find a 'good first issue' on GitHub"
35+
echo "4. Make your contribution!"
36+
echo ""
37+
echo "GitHub link: https://github.com/$(grep -oP 'url = \K.*' "$REPOS_DIR/$random_repo/.git/config" 2>/dev/null | sed 's|https://github.com/||' | sed 's|\.git||' || echo "unknown")"
38+
echo ""
39+

scripts/setup_opensource_repos.sh

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/bin/bash
2+
# Setup script to clone open source repositories for contribution
3+
# This will clone repos locally so you can contribute later
4+
5+
set -e
6+
7+
# Directory to store all cloned repos
8+
REPOS_DIR="/Users/alwayskamalsai/CustomProjects"
9+
mkdir -p "$REPOS_DIR"
10+
11+
# List of repositories to clone
12+
declare -a REPOS=(
13+
"tiangolo/fastapi"
14+
"pytest-dev/pytest"
15+
"dpkp/kafka-python"
16+
"gohugoio/hugo"
17+
"docker/cli"
18+
"helm/helm"
19+
"kubernetes/kubernetes"
20+
"segmentio/kafka-go"
21+
"vitejs/vite"
22+
"typescript-eslint/typescript-eslint"
23+
"vitest-dev/vitest"
24+
"mui/material-ui"
25+
"streamich/react-use"
26+
"Leaflet/Leaflet"
27+
"electron/electron"
28+
"cypress-io/cypress"
29+
"ToolJet/ToolJet"
30+
)
31+
32+
echo "=========================================="
33+
echo "Open Source Repository Setup"
34+
echo "=========================================="
35+
echo ""
36+
echo "This script will clone the following repositories to:"
37+
echo "$REPOS_DIR"
38+
echo ""
39+
echo "Repositories to clone:"
40+
for repo in "${REPOS[@]}"; do
41+
echo " - $repo"
42+
done
43+
echo ""
44+
read -p "Continue? (y/n) " -n 1 -r
45+
echo ""
46+
47+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
48+
echo "Cancelled."
49+
exit 1
50+
fi
51+
52+
cd "$REPOS_DIR"
53+
54+
# Clone each repository
55+
for repo in "${REPOS[@]}"; do
56+
repo_name=$(basename "$repo")
57+
echo ""
58+
echo "=========================================="
59+
echo "Cloning $repo..."
60+
echo "=========================================="
61+
62+
if [ -d "$repo_name" ]; then
63+
echo " ⚠️ Directory $repo_name already exists, skipping..."
64+
echo " (Run 'cd $repo_name && git pull' to update)"
65+
else
66+
git clone "https://github.com/$repo.git" "$repo_name" || {
67+
echo " ❌ Failed to clone $repo"
68+
continue
69+
}
70+
echo " ✅ Cloned $repo_name"
71+
fi
72+
done
73+
74+
echo ""
75+
echo "=========================================="
76+
echo "Setup Complete!"
77+
echo "=========================================="
78+
echo ""
79+
echo "All repositories cloned to: $REPOS_DIR"
80+
echo ""
81+
echo "Next steps:"
82+
echo "1. Fork repositories on GitHub (go to each repo and click Fork)"
83+
echo "2. Add your fork as a remote:"
84+
echo " cd $REPOS_DIR/[repo-name]"
85+
echo " git remote add fork https://github.com/YOUR_USERNAME/[repo-name].git"
86+
echo "3. Find 'good first issue' labels and start contributing!"
87+
echo ""
88+
echo "To track your contributions, see: scripts/track_contributions.md"
89+

scripts/track_contributions.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Open Source Contribution Tracker
2+
3+
## Repository Status
4+
5+
| Repository | Cloned | Forked | Issue Selected | Branch Created | PR Status |
6+
|------------|--------|--------|----------------|----------------|-----------|
7+
| FastAPI ||||||
8+
| Pytest ||||||
9+
| kafka-python ||||||
10+
| Hugo ||||||
11+
| Docker CLI ||||||
12+
| Helm ||||||
13+
| Kubernetes ||||||
14+
| kafka-go ||||||
15+
| Vite ||||||
16+
| typescript-eslint ||||||
17+
| Vitest ||||||
18+
| Material-UI ||||||
19+
| react-use ||||||
20+
| Leaflet ||||||
21+
| Electron ||||||
22+
| Cypress ||||||
23+
| ToolJet ||||||
24+
25+
## Contribution Workflow
26+
27+
1. **Clone Repository** ✅ (Run setup script)
28+
2. **Fork on GitHub** - Go to repo and click Fork
29+
3. **Add Fork Remote**:
30+
```bash
31+
cd ~/opensource-contributions/[repo-name]
32+
git remote add fork https://github.com/YOUR_USERNAME/[repo-name].git
33+
```
34+
4. **Find Good First Issue** - Look for "good first issue" label
35+
5. **Create Branch**:
36+
```bash
37+
git checkout -b fix/issue-[number]-[description]
38+
```
39+
6. **Make Changes** - Implement the fix/feature
40+
7. **Commit & Push**:
41+
```bash
42+
git add .
43+
git commit -m "fix: [description] (fixes #issue-number)"
44+
git push fork fix/issue-[number]-[description]
45+
```
46+
8. **Create Draft PR** - On GitHub, create PR as draft
47+
9. **Review & Submit** - Review your changes, then mark PR as ready
48+
49+
## Quick Commands
50+
51+
### Pick a random repo to contribute to:
52+
```bash
53+
cd ~/opensource-contributions
54+
ls | shuf -n 1
55+
```
56+
57+
### Update all repos:
58+
```bash
59+
cd ~/opensource-contributions
60+
for dir in */; do
61+
echo "Updating $dir"
62+
cd "$dir" && git pull && cd ..
63+
done
64+
```
65+
66+
### Find good first issues:
67+
Visit: https://github.com/[org]/[repo]/labels/good%20first%20issue
68+

0 commit comments

Comments
 (0)