Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 175 additions & 0 deletions .github/QUICKREF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Weekly Changelog Automation - Quick Reference

## πŸš€ One-Time Setup (5 minutes)

### Step 1: Add API Key Secret
1. Go to: **Settings** β†’ **Secrets and variables** β†’ **Actions**
2. Click **New repository secret**
3. Name: `ANTHROPIC_API_KEY`
4. Value: Your API key (from https://console.anthropic.com/settings/keys)
5. Click **Add secret**

### Step 2: Enable Workflow Permissions
1. Go to: **Settings** β†’ **Actions** β†’ **General**
2. Under **Workflow permissions**:
- βœ… Select **Read and write permissions**
- βœ… Check **Allow GitHub Actions to create and approve pull requests**
3. Click **Save**

### Step 3: Test
1. Go to: **Actions** tab
2. Click: **Weekly Changelog Generation**
3. Click: **Run workflow** β†’ **Run workflow**
4. Wait ~5-10 minutes
5. Check for new PR

**Done!** The workflow will now run automatically every Wednesday at 10:00 UTC.

---

## πŸ“… Schedule

**Automatic**: Every Wednesday at 10:00 UTC (18:00 Beijing Time)

**Manual**:
- Go to **Actions** β†’ **Weekly Changelog Generation** β†’ **Run workflow**

---

## πŸ”„ Weekly Workflow

### What Happens Automatically
```
Wednesday 10:00 UTC
↓
1. Fetch PRs from past 7 days
↓
2. AI analyzes PR content
↓
3. Determines version bump (major/minor/patch)
↓
4. Generates changelog
↓
5. Creates Pull Request
↓
6. Notifies via GitHub
```

### Your Action Items (Once PR is Created)
1. βœ… Review the PR (usually within 1 hour of Wednesday 10:00 UTC)
2. βœ… Verify version bump type is correct
3. βœ… Merge the PR
4. βœ… Copy content to mintlify-docs repository
5. βœ… Create PR to mintlify-docs

**Time required**: 5-10 minutes per week

---

## πŸ“Š Version Bump Types

| Type | When | Example | Icon |
|------|------|---------|------|
| **Patch** | Bug fixes, improvements | 4.3.5 β†’ 4.3.6 | πŸ”§ |
| **Minor** | New features, capabilities | 4.3.5 β†’ 4.4.0 | πŸš€ |
| **Major** | Platform transformation | 4.3.5 β†’ 5.0.0 | πŸŽ‰ |

AI automatically determines the appropriate type based on PR content.

---

## πŸ” Monitoring

### Check Workflow Status
**Actions** β†’ **Weekly Changelog Generation** β†’ View recent runs

### Review PR
**Pull requests** β†’ Look for `Weekly Changelog: v4.X.X`

### Check Artifacts
Each run uploads the changelog file as an artifact (available for 30 days)

---

## ❓ Troubleshooting

### Workflow Failed?
1. Click on failed workflow run
2. View logs to see error
3. Common issues:
- Missing `ANTHROPIC_API_KEY` secret
- Insufficient workflow permissions
- API rate limits (rare)

### No PR Created?
- This is normal if no PRs were merged in the past week
- Workflow exits gracefully with success status

### Wrong Version Bump?
1. Review the PR description
2. If needed, manually edit the version in the file
3. Comment on PR explaining why manual override was needed

### Need to Re-run?
1. Go to failed workflow run
2. Click **Re-run jobs**
3. Or trigger manually via **Run workflow** button

---

## πŸ’‘ Tips

### Change Schedule
Edit `.github/workflows/weekly-changelog.yml`:
```yaml
schedule:
- cron: '0 10 * * 3' # Current: Wed 10:00 UTC
# Examples:
# - cron: '0 18 * * 3' # Wed 18:00 UTC (02:00 Beijing next day)
# - cron: '0 2 * * 4' # Thu 02:00 UTC (10:00 Beijing)
```

### Test Locally First
```bash
export ANTHROPIC_API_KEY='your_key'
export GITHUB_TOKEN='your_token'
export DAYS_LOOKBACK=7

python3 scripts/fetch_github_prs.py
python3 scripts/generate_weekly_changelog.py
```

### Skip a Week
If you need to skip a week (holidays, etc.):
1. Go to **Actions** β†’ **Weekly Changelog Generation**
2. Click **β‹―** β†’ **Disable workflow**
3. Re-enable after the week you want to skip

### Force Specific Version Bump
Currently not supported via automation. If needed:
1. Run workflow normally
2. Manually edit generated file to change version
3. Document reason in PR comments

---

## πŸ“ž Support

- **Setup Issues**: See [.github/SETUP.md](SETUP.md)
- **Workflow Details**: See [docs/WEEKLY_MODE.md](../docs/WEEKLY_MODE.md)
- **Version Rules**: See [docs/VERSION_NUMBERING.md](../docs/VERSION_NUMBERING.md)
- **GitHub Actions Docs**: https://docs.github.com/actions

---

## πŸ“ˆ Metrics

**Expected Costs**:
- API: $1-3 per week
- GitHub Actions: Free (for public repos)

**Time Savings**:
- Manual: ~30-60 minutes per week
- Automated: ~5-10 minutes per week (review only)

**Annual Savings**: ~25-40 hours of manual work πŸŽ‰
Loading