Battery not charging during low-price periods after midnight #2
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
| # Issue Triage Bot | |
| # | |
| # TRIGGERS (automatic — no manual action required): | |
| # issues.opened → classify, label, and respond to every new issue | |
| # issue_comment.created → when user provides debug log on a needs-debug-log issue, | |
| # run deeper analysis automatically | |
| # | |
| # The triage bot will: | |
| # - Classify as bug / feature / question / other and apply labels | |
| # - For bugs without debug info: post instructions for getting a debug report | |
| # - For bugs with debug info: post initial root-cause analysis | |
| # - For feature requests: acknowledge and ask for use-case details | |
| # | |
| # After triage, the fix pipeline is triggered manually: | |
| # Comment "@claude-bot fix this" on any issue to invoke issue_fixer.py | |
| name: Issue Triage | |
| on: | |
| issues: | |
| types: [opened, reopened] | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Triage new issues automatically | |
| # --------------------------------------------------------------------------- | |
| triage-new-issue: | |
| name: Triage New Issue | |
| if: github.event_name == 'issues' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.CLAUDE_REVIEWER_APP_ID }} | |
| private-key: ${{ secrets.CLAUDE_REVIEWER_PRIVATE_KEY }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install anthropic PyGithub | |
| - env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| REPO_FULL_NAME: ${{ github.repository }} | |
| GITHUB_RUN_ID: ${{ github.run_id }} | |
| GITHUB_SERVER_URL: ${{ github.server_url }} | |
| TRIAGE_MODE: triage | |
| run: python scripts/issue_triage.py | |
| # --------------------------------------------------------------------------- | |
| # Analyze debug log when user provides one on a waiting issue | |
| # --------------------------------------------------------------------------- | |
| analyze-debug-log: | |
| name: Analyze Debug Log | |
| if: | | |
| github.event_name == 'issue_comment' && | |
| github.event.issue.pull_request == null && | |
| contains(toJson(github.event.issue.labels), 'needs-debug-log') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.CLAUDE_REVIEWER_APP_ID }} | |
| private-key: ${{ secrets.CLAUDE_REVIEWER_PRIVATE_KEY }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install anthropic PyGithub | |
| - env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| REPO_FULL_NAME: ${{ github.repository }} | |
| GITHUB_RUN_ID: ${{ github.run_id }} | |
| GITHUB_SERVER_URL: ${{ github.server_url }} | |
| TRIAGE_MODE: analyze_log | |
| run: python scripts/issue_triage.py |