Extract CurrentHeartRateDisplay Component #932
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
| name: Gemini Invoke | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: read | |
| jobs: | |
| invoke: | |
| if: startsWith(github.event.comment.body, '@gemini-bot') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Create Context Files | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| ISSUE_BODY: ${{ github.event.issue.body }} | |
| ISSUE_TITLE: ${{ github.event.issue.title }} | |
| run: | | |
| echo "Issue Title: $ISSUE_TITLE" > issue_context.txt | |
| echo "Issue Body:" >> issue_context.txt | |
| echo "$ISSUE_BODY" >> issue_context.txt | |
| echo "User comment: $COMMENT_BODY" > task_input.txt | |
| echo "Context:" >> task_input.txt | |
| cat issue_context.txt >> task_input.txt | |
| - name: Run Gemini | |
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| INVOKE_CONTEXT_FILES: ${{ vars.INVOKE_CONTEXT_FILES || 'README.md,DEVELOPMENT.md,docs/agents/AGENT_TRIAGE.md' }} | |
| run: | | |
| npx tsx scripts/gemini-client.ts \ | |
| --task-file "task_input.txt" \ | |
| --context "$INVOKE_CONTEXT_FILES" \ | |
| --output "reply.md" | |
| - name: Reply to Comment | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.ARI_PAT }} | |
| script: | | |
| const fs = require('fs'); | |
| try { | |
| const body = fs.readFileSync('reply.md', 'utf8'); | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: body | |
| }); | |
| } catch (e) { | |
| console.error('Failed to post reply:', e); | |
| core.setFailed('No reply generated or error posting comment'); | |
| } |