diff options
| author | Aiden Cline <[email protected]> | 2025-12-15 19:15:40 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-15 19:15:40 -0600 |
| commit | bfb254dac6f8a3ea217f5393a33d87c030b12b6d (patch) | |
| tree | 4ed598d3015439d5761ab0f6c0ae56092f97823d /.github/workflows | |
| parent | 92fe9277859afa2d0bd2c47282bc4c248f017aa2 (diff) | |
| download | opencode-bfb254dac6f8a3ea217f5393a33d87c030b12b6d.tar.gz opencode-bfb254dac6f8a3ea217f5393a33d87c030b12b6d.zip | |
ci: auto triage issues
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/auto-label-tui.yml | 63 | ||||
| -rw-r--r-- | .github/workflows/triage.yml | 32 |
2 files changed, 32 insertions, 63 deletions
diff --git a/.github/workflows/auto-label-tui.yml b/.github/workflows/auto-label-tui.yml deleted file mode 100644 index c2f81a380..000000000 --- a/.github/workflows/auto-label-tui.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Auto-label TUI Issues - -on: - issues: - types: [opened] - -jobs: - auto-label: - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Auto-label and assign issues - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issue = context.payload.issue; - const title = issue.title; - const description = issue.body || ''; - - // Check for "opencode web" keyword - const webPattern = /(opencode web)/i; - const isWebRelated = webPattern.test(title) || webPattern.test(description); - - // Check for version patterns like v1.0.x or 1.0.x - const versionPattern = /[v]?1\.0\./i; - const isVersionRelated = versionPattern.test(title) || versionPattern.test(description); - - // Check for "nix" keyword - const nixPattern = /\bnix\b/i; - const isNixRelated = nixPattern.test(title) || nixPattern.test(description); - - const labels = []; - - if (isWebRelated) { - labels.push('web'); - - // Assign to adamdotdevin - await github.rest.issues.addAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - assignees: ['adamdotdevin'] - }); - } else if (isVersionRelated) { - // Only add opentui if NOT web-related - labels.push('opentui'); - } - - if (isNixRelated) { - labels.push('nix'); - } - - if (labels.length > 0) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - labels: labels - }); - } diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 000000000..2900137f0 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,32 @@ +name: Issue 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: 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 }} + run: | + opencode run --agent triage "The following issue was just opened, triage it: + + Title: ${{ github.event.issue.title }} + + ${{ github.event.issue.body }}" |
