Skip to content

feat: Gmail token auto-renewal system - keepalive + auto-rotation #156

feat: Gmail token auto-renewal system - keepalive + auto-rotation

feat: Gmail token auto-renewal system - keepalive + auto-rotation #156

Workflow file for this run

# Universal Tuya Zigbee - Code Quality Checks
# v5.8.88 - Updated 2026-02-10
# Checks for common bugs and code patterns
name: πŸ” Code Quality Check
on:
pull_request:
branches: [master, main]
push:
branches: [master, main]
paths:
- '**.js'
- 'drivers/**/*.json'
workflow_dispatch:
permissions:
contents: read
jobs:
quality:
name: πŸ”§ Quality Checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: πŸ” Check Common Bugs
run: |
echo "## πŸ” Code Quality" >> $GITHUB_STEP_SUMMARY
# Settings keys bug
if grep -rq "zb_modelId\|zb_manufacturerName" lib/ drivers/ --include="*.js" 2>/dev/null; then
echo "❌ Wrong settings keys (use zb_model_id)" >> $GITHUB_STEP_SUMMARY
else
echo "βœ… Settings keys OK" >> $GITHUB_STEP_SUMMARY
fi
# Flow card bug
if grep -rq "titleFormatted.*\[\[device\]\]" drivers/ --include="*.json" 2>/dev/null; then
echo "❌ titleFormatted [[device]] bug" >> $GITHUB_STEP_SUMMARY
else
echo "βœ… Flow cards OK" >> $GITHUB_STEP_SUMMARY
fi
# Import bug
if grep -rq "require.*TuyaZigbeeDriver" drivers/ --include="*.js" 2>/dev/null; then
echo "❌ Wrong TuyaZigbeeDriver import" >> $GITHUB_STEP_SUMMARY
else
echo "βœ… Imports OK" >> $GITHUB_STEP_SUMMARY
fi
- name: πŸ” Check getConditionCard vs getDeviceConditionCard
run: |
# Check for wrong flow card method usage
WRONG_METHOD=$(grep -rn "getConditionCard" drivers/ --include="*.js" 2>/dev/null | grep -v "getDeviceConditionCard" | wc -l)
if [ "$WRONG_METHOD" -gt 0 ]; then
echo "⚠️ Found $WRONG_METHOD uses of getConditionCard (check if should be getDeviceConditionCard)" >> $GITHUB_STEP_SUMMARY
else
echo "βœ… Flow card methods OK" >> $GITHUB_STEP_SUMMARY
fi
- name: πŸ“Š Stats
run: |
DRIVERS=$(ls -d drivers/*/ 2>/dev/null | wc -l)
MFRS=$(grep -ohE '"_TZ[^"]+"' drivers/*/driver.compose.json 2>/dev/null | sort -u | wc -l)
FLOWCARDS=$(grep -c '"id":' drivers/*/driver.flow.compose.json 2>/dev/null | awk -F: '{sum+=$2} END {print sum}')
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Count |" >> $GITHUB_STEP_SUMMARY
echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Drivers | $DRIVERS |" >> $GITHUB_STEP_SUMMARY
echo "| Manufacturer IDs | $MFRS |" >> $GITHUB_STEP_SUMMARY
echo "| Flow Cards | $FLOWCARDS |" >> $GITHUB_STEP_SUMMARY