Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 0 additions & 120 deletions .github/workflows/build-desktop.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/ci.yml

This file was deleted.

30 changes: 20 additions & 10 deletions .github/workflows/opencode-agents.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
name: Opencode Agents

on:
issues:
types: [opened]
pull_request_target:
types: [opened]
workflow_dispatch:
inputs:
target:
description: Run issue triage or duplicate PR check
required: true
type: choice
options:
- issue
- pull_request
number:
description: Issue or pull request number
required: true
type: number

jobs:
triage-issue:
if: github.event_name == 'issues'
if: inputs.target == 'issue'
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
Expand All @@ -33,17 +42,18 @@ jobs:
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ inputs.number }}
run: |
cat > /tmp/issue_prompt.txt <<'PROMPT_EOF'
The following issue was just opened, triage it:
PROMPT_EOF
ISSUE_TITLE="$(gh issue view "$ISSUE_NUMBER" --json title --jq .title)"
ISSUE_BODY="$(gh issue view "$ISSUE_NUMBER" --json body --jq .body)"
printf '\nTitle: %s\n\n%s\n' "$ISSUE_TITLE" "$ISSUE_BODY" >> /tmp/issue_prompt.txt
opencode run --agent triage "$(cat /tmp/issue_prompt.txt)"

duplicate-prs:
if: github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'opencode-agent[bot]'
if: inputs.target == 'pull_request'
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
Expand All @@ -67,7 +77,7 @@ jobs:
- name: Build prompt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_NUMBER: ${{ inputs.number }}
run: |
{
echo "Check for duplicate PRs related to this new PR:"
Expand All @@ -84,7 +94,7 @@ jobs:
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_NUMBER: ${{ inputs.number }}
run: |
opencode run --agent duplicate-pr "$(cat pr_info.txt)" > /tmp/comment_output.txt

Expand Down
Loading