Skip to content

Latest commit

 

History

History
191 lines (135 loc) · 3.73 KB

File metadata and controls

191 lines (135 loc) · 3.73 KB

Pre-Commit Checklist

Complete this checklist before committing changes to the repository.

✅ Documentation

  • README.md created (human-readable overview)
  • AGENTS.md created (technical documentation for AI agents)
  • SETUP.md created (content author guide)
  • PRD.md updated with latest changes

✅ Code Quality

  • No console.log or debug statements in production code
  • All files properly formatted
  • No TODO/FIXME comments without issues filed
  • TypeScript errors resolved
  • Build completes successfully

✅ Content

  • All lesson metadata in lessons.json
  • Tags are single-word format
  • All links include /AZD-Templates base path
  • No duplicate H1 headings in markdown files
  • lastUpdated timestamps are current

✅ Configuration

  • astro.config.mjs properly configured
  • package.json scripts include telemetry disable
  • DevContainer configuration working
  • GitHub Actions workflow configured

✅ Security & Privacy

  • No API keys or secrets in code
  • No personal information in commits
  • .gitignore includes sensitive files
  • .DO_NOT_COMMIT/ folder excluded

✅ Build & Test

Run these commands before committing:

# Clean build
npm run build

# Should exit with code 0
echo $?

# Preview build
npm run preview

Expected results:

✅ Git Status

Check what will be committed:

# View status
git status

# Review changes
git diff

# Check for untracked files that should be ignored
git status --ignored

✅ Ignored Files Verification

Ensure these are NOT being committed:

  • .DO_NOT_COMMIT/ folder
  • node_modules/
  • .astro/
  • dist/
  • *.log files
  • .env or .env.local files
# Verify gitignore is working
git check-ignore -v .DO_NOT_COMMIT/
# Should output: .gitignore:2:.DO_NOT_COMMIT/

✅ Commit Message

Use clear, descriptive commit messages:

Good Examples:

Add interactive lesson browser with search and filters
Update lesson metadata schema with tags and timestamps
Fix card alignment issues in LessonCards component
Create comprehensive documentation (README, AGENTS, SETUP)

Bad Examples:

Update files
Fix stuff
Changes
WIP

🚀 Ready to Commit

If all checks pass:

# Stage changes
git add .

# Commit with message
git commit -m "Your descriptive message here"

# Push to main (triggers deployment)
git push origin main

📋 Post-Commit Verification

After pushing to main:

  1. Check GitHub Actions:

    • Go to repository → Actions tab
    • Verify workflow runs successfully
    • Check all steps complete (build, deploy)
  2. Verify Deployment:

  3. Monitor for Issues:

    • Check for any error messages
    • Verify images and assets load
    • Test on mobile device/responsive design

🐛 Rollback Plan

If something goes wrong:

# Revert last commit
git revert HEAD

# Push revert
git push origin main

Or create a hotfix:

# Create hotfix branch
git checkout -b hotfix/issue-description

# Make fixes
# ... edit files ...

# Commit and push
git add .
git commit -m "Hotfix: description"
git push origin hotfix/issue-description

# Create PR to main

📝 Additional Notes

  • Always test locally before pushing to main
  • Main branch triggers automatic deployment
  • Breaking changes should be discussed in PRs first
  • Document significant changes in commit messages

Last Updated: January 8, 2026