feat: Gmail token auto-renewal system - keepalive + auto-rotation #156
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |