|
| 1 | +--- |
| 2 | +title: Configuration |
| 3 | +description: All Bugbot-related action inputs: severity, comment limit, verify commands, and ignore files. |
| 4 | +--- |
| 5 | + |
| 6 | +# Configuration |
| 7 | + |
| 8 | +This page lists every **Bugbot-related** input: what it does, default value, and example usage. For the full list of Copilot inputs (branches, labels, projects, etc.), see [Configuration](/configuration). |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## OpenCode (required for Bugbot) |
| 13 | + |
| 14 | +Bugbot depends on OpenCode for both **detection** (Plan agent) and **autofix / do-user-request** (Build agent). These inputs are shared with other AI features (progress, Think, AI PR description). |
| 15 | + |
| 16 | +| Input | Default | Description | |
| 17 | +|-------|---------|-------------| |
| 18 | +| **`opencode-server-url`** | `http://localhost:4096` | URL of the OpenCode server. The runner must be able to reach it (e.g. same job if you use `opencode-start-server: true`). | |
| 19 | +| **`opencode-model`** | `opencode/kimi-k2.5-free` | Model in `provider/model` format (e.g. `anthropic/claude-3-5-sonnet`, `openai/gpt-4o-mini`). | |
| 20 | +| **`opencode-start-server`** | `true` | If `true`, the action starts an OpenCode server at job start and stops it at job end. Requires provider API keys (e.g. `OPENAI_API_KEY`) passed as env. If you run OpenCode yourself, set to `false` and pass `opencode-server-url`. | |
| 21 | + |
| 22 | +Without a valid `opencode-server-url` and `opencode-model`, Bugbot **detection** is skipped (no findings posted). **Autofix** and **do-user-request** also require OpenCode and a running server (or `opencode-start-server: true`) so the Build agent can apply changes in the workspace. |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## bugbot-severity |
| 27 | + |
| 28 | +**Default:** `low` |
| 29 | + |
| 30 | +**Description:** Minimum severity for findings to be **published** as comments on the issue and PR. Findings with severity **below** this threshold are filtered out before publishing. |
| 31 | + |
| 32 | +| Value | Findings published | |
| 33 | +|-------|---------------------| |
| 34 | +| `info` | info, low, medium, high | |
| 35 | +| `low` | low, medium, high | |
| 36 | +| `medium` | medium, high | |
| 37 | +| `high` | high only | |
| 38 | + |
| 39 | +**Example:** |
| 40 | + |
| 41 | +```yaml |
| 42 | +# Only report medium and high (skip low and info) |
| 43 | +bugbot-severity: "medium" |
| 44 | +``` |
| 45 | +
|
| 46 | +```yaml |
| 47 | +# Report everything including info |
| 48 | +bugbot-severity: "info" |
| 49 | +``` |
| 50 | +
|
| 51 | +--- |
| 52 | +
|
| 53 | +## bugbot-comment-limit |
| 54 | +
|
| 55 | +**Default:** `20` |
| 56 | + |
| 57 | +**Description:** Maximum number of findings to publish as **individual** comments on the issue and PR. If OpenCode returns more findings (after severity and ignore filters), only the first N are posted one per comment; the rest are summarized in a **single overflow comment** on the issue (e.g. “X additional findings were not posted; consider reviewing the branch locally”). |
| 58 | + |
| 59 | +The value is clamped between **1** and **200** (or your docs’ stated range). Use a higher limit if you want more findings visible at the cost of more comments. |
| 60 | + |
| 61 | +**Example:** |
| 62 | + |
| 63 | +```yaml |
| 64 | +# Default: up to 20 individual comments + 1 overflow if needed |
| 65 | +bugbot-comment-limit: "20" |
| 66 | +
|
| 67 | +# Stricter: only 10 individual comments |
| 68 | +bugbot-comment-limit: "10" |
| 69 | +
|
| 70 | +# Allow up to 50 individual comments |
| 71 | +bugbot-comment-limit: "50" |
| 72 | +``` |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## bugbot-fix-verify-commands |
| 77 | + |
| 78 | +**Default:** `""` (empty) |
| 79 | + |
| 80 | +**Description:** Comma-separated list of **commands** to run **after** OpenCode applies changes (autofix or do-user-request) and **before** the action commits and pushes. Typically: build, test, lint. If **any** command fails, the action **does not commit**; no push happens and findings are not marked as resolved. |
| 81 | + |
| 82 | +- Commands are parsed (e.g. with shell-quote) and run in the runner; there is a **maximum of 20** commands. |
| 83 | +- If left **empty**, only OpenCode’s own execution is used; the action may still commit if there are file changes. |
| 84 | + |
| 85 | +**Example:** |
| 86 | + |
| 87 | +```yaml |
| 88 | +# Run build, test, and lint before committing |
| 89 | +bugbot-fix-verify-commands: "npm run build, npm test, npm run lint" |
| 90 | +``` |
| 91 | + |
| 92 | +```yaml |
| 93 | +# Single command |
| 94 | +bugbot-fix-verify-commands: "npm test" |
| 95 | +``` |
| 96 | + |
| 97 | +```yaml |
| 98 | +# From a repo/organization variable (recommended for secrets or env-specific commands) |
| 99 | +bugbot-fix-verify-commands: ${{ vars.BUGBOT_AUTOFIX_VERIFY_COMMANDS }} |
| 100 | +``` |
| 101 | + |
| 102 | +Use this in workflows that run on **`issue_comment`** or **`pull_request_review_comment`** so autofix and do-user-request only commit when your checks pass. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## ai-ignore-files |
| 107 | + |
| 108 | +**Default:** `""` (empty) |
| 109 | + |
| 110 | +**Description:** Comma-separated list of **paths or patterns** to **exclude** from AI operations that analyze file content or paths. For Bugbot: |
| 111 | + |
| 112 | +- **Detection:** These paths are passed to OpenCode in the prompt (“do not report findings in files matching …”) and findings in matching files are **filtered out** before publishing. |
| 113 | +- **Autofix / do-user-request:** The ignore list is not used to restrict which files the Build agent can edit; it mainly affects **detection** and reporting. |
| 114 | + |
| 115 | +Common use: exclude generated code, vendored deps, or noisy directories. |
| 116 | + |
| 117 | +**Example:** |
| 118 | + |
| 119 | +```yaml |
| 120 | +# Ignore build output and lockfiles |
| 121 | +ai-ignore-files: "build/*, dist/*, package-lock.json" |
| 122 | +``` |
| 123 | + |
| 124 | +```yaml |
| 125 | +# Ignore specific dirs and patterns |
| 126 | +ai-ignore-files: "**/node_modules/**, **/vendor/**, *.min.js" |
| 127 | +``` |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## Summary table |
| 132 | + |
| 133 | +| Input | Default | Used by | |
| 134 | +|-------|---------|---------| |
| 135 | +| `opencode-server-url` | `http://localhost:4096` | Detection, autofix, do-user-request | |
| 136 | +| `opencode-model` | `opencode/kimi-k2.5-free` | Detection, autofix, do-user-request | |
| 137 | +| `opencode-start-server` | `true` | All AI features | |
| 138 | +| `bugbot-severity` | `low` | Detection (filter before publish) | |
| 139 | +| `bugbot-comment-limit` | `20` | Detection (max individual comments) | |
| 140 | +| `bugbot-fix-verify-commands` | `""` | Autofix, do-user-request (before commit) | |
| 141 | +| `ai-ignore-files` | `""` | Detection (exclude paths from findings) | |
| 142 | + |
| 143 | +--- |
| 144 | + |
| 145 | +## Next steps |
| 146 | + |
| 147 | +- **[Detection](/bugbot/detection)** — How severity and comment limit affect published findings. |
| 148 | +- **[Autofix](/bugbot/autofix)** — How verify commands gate commits. |
| 149 | +- **[Configuration](/configuration)** — Full Copilot configuration reference. |
0 commit comments