summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/triage.yml
blob: 99e7b5b34fe33649539361a8d69d580edf143204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: triage

on:
  issues:
    types: [opened]

jobs:
  triage:
    runs-on: blacksmith-4vcpu-ubuntu-2404
    permissions:
      contents: read
      issues: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 1

      - name: Setup Bun
        uses: ./.github/actions/setup-bun

      - name: Install opencode
        run: curl -fsSL https://opencode.ai/install | bash

      - name: Triage issue
        env:
          OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ISSUE_NUMBER: ${{ github.event.issue.number }}
          ISSUE_TITLE: ${{ github.event.issue.title }}
          ISSUE_BODY: ${{ github.event.issue.body }}
        run: |
          opencode run --agent triage "The following issue was just opened, triage it:

          Title: $ISSUE_TITLE

          $ISSUE_BODY"