Files
openchamber/.github/workflows/triage.yml
T

50 lines
1.3 KiB
YAML

name: triage
on:
issues:
types: [opened]
concurrency:
group: triage-${{ github.event.issue.number }}
cancel-in-progress: true
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Generate bot app token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OC_REVIEW_APP_ID }}
private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }}
- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash
- name: Triage issue
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
run: |
opencode run --agent triage "An issue was just opened in the OpenChamber repository. Triage it.
Issue: $ISSUE_URL
Title: $ISSUE_TITLE
$ISSUE_BODY"