name: reproduce-issue on: issues: types: [labeled] jobs: reproduce: if: github.event.label.name == 'bug' runs-on: ubuntu-latest concurrency: group: reproduce-issue-${{ github.event.issue.number }} cancel-in-progress: true permissions: contents: write issues: write steps: - 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: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 1 token: ${{ steps.app-token.outputs.token }} - name: Setup Bun uses: oven-sh/setup-bun@v2 - name: Install dependencies run: bun install --frozen-lockfile - name: Install opencode run: curl -fsSL https://opencode.ai/install | bash - name: Reproduce 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 reproduce-issue "An issue in the OpenChamber repository has been labeled as a bug and needs reproduction. Reproduce it. Issue: $ISSUE_URL Title: $ISSUE_TITLE $ISSUE_BODY"