Automatically send yourself a weekly email digest of repositories you've starred on GitHub – beautifully formatted and fully automated.
- ⏱️ Runs weekly via GitHub Actions
- 🌐 Fetches your starred repos using GitHub API
- 📬 Sends an HTML email via Mailgun (or any SMTP provider)
- 🎨 Styled output with repo metadata (language, stars, last updated, forked)
- ⚙️ Fully configurable via
.env
file - 💡 Great for keeping track of projects you love
git clone https://github.com/YOUR_USERNAME/github-stars-newsletter.git
cd github-stars-newsletter
npm install
Create a .env
file:
PAT_GITHUB_TOKEN=ghp_xxx # GitHub Personal Access Token
MAILGUN_USER=postmaster@sandboxXXXX.mailgun.org
MAILGUN_PASS=your_mailgun_smtp_password
EMAIL_FROM=Your Name <you@example.com>
EMAIL_TO=Your Name <you@example.com>
TARGET_USERNAME=YourGitHubUsername
REPO_LIMIT=10
EMAIL_SUBJECT=Your GitHub Star Digest
💡 Use a GitHub PAT with public_repo scope. For Mailgun, either upgrade your account or authorize recipients.
node fetchStars.js
You should receive an email with the latest starred repositories.
This project includes a ready-to-use GitHub Actions workflow.
Go to Settings > Secrets and variables > Actions and add the following:
Secret Name | Value |
---|---|
PAT_GITHUB_TOKEN | Your GitHub PAT |
MAILGUN_USER | SMTP login from Mailgun |
MAILGUN_PASS | SMTP password from Mailgun |
EMAIL_FROM | Sender email (name + email) |
EMAIL_TO | Recipient email |
TARGET_USERNAME | GitHub username to track |
REPO_LIMIT | Number of repos to include |
EMAIL_SUBJECT | Email subject line |
Located at .github/workflows/send-newsletter.yml
. Runs every Monday at 09:00 UTC by default.
- 💅 Style the email by editing
formatEmailContent()
insendEmail.js
- 📄 Add more repo metadata (forks, license, topics, etc.)
- 🔌 Switch from Mailgun to Gmail, Sendinblue, etc. using Nodemailer transports
- Node.js
- GitHub REST API
- Nodemailer
- Mailgun SMTP
- GitHub Actions
This project was built for automation, exploration and fun. It helps you stay in touch with projects you've starred – in your inbox, every week.
MIT