Skip to content
Open
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
4 changes: 4 additions & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ GitHub Apps are preferred over PATs for production use because they offer fine-g
| `spec.when.webhook.filters[].field` | JSONPath expression selecting the payload field to match | Yes (per filter) |
| `spec.when.webhook.filters[].value` | Require an exact string match against the extracted field value (mutually exclusive with `pattern`) | Conditional |
| `spec.when.webhook.filters[].pattern` | Require a regex match against the extracted field value (mutually exclusive with `value`) | Conditional |
| `spec.when.jira.baseUrl` | Jira instance URL (e.g., `https://mycompany.atlassian.net`) | Yes (when using jira) |
| `spec.when.jira.project` | Jira project key (e.g., `PROJ`) | Yes (when using jira) |
| `spec.when.jira.jql` | Optional JQL filter appended to the default query; when set, the full query is `project = <project> AND (<jql>)` | No |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 JQL description omits ORDER BY handling

The description states the full query is project = <project> AND (<jql>), but when jql contains an ORDER BY clause, the implementation extracts it and places it outside the parentheses (e.g., project = PROJ AND (status = Open) ORDER BY created DESC). Without this note, a reader substituting their own JQL with ORDER BY into the documented pattern would produce invalid JQL (project = PROJ AND (status = Open ORDER BY created DESC)).

Consider clarifying, e.g.:

Suggested change
| `spec.when.jira.jql` | Optional JQL filter appended to the default query; when set, the full query is `project = <project> AND (<jql>)` | No |
| `spec.when.jira.jql` | Optional JQL filter appended to the default query; when set, the full query is `project = <project> AND (<jql>)`. `ORDER BY` clauses are automatically hoisted outside the parentheses, so `jql: "status = Open ORDER BY created DESC"` produces `project = PROJ AND (status = Open) ORDER BY created DESC`. | No |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/reference.md
Line: 184

Comment:
**JQL description omits ORDER BY handling**

The description states the full query is `project = <project> AND (<jql>)`, but when `jql` contains an `ORDER BY` clause, the implementation extracts it and places it outside the parentheses (e.g., `project = PROJ AND (status = Open) ORDER BY created DESC`). Without this note, a reader substituting their own JQL with `ORDER BY` into the documented pattern would produce invalid JQL (`project = PROJ AND (status = Open ORDER BY created DESC)`).

Consider clarifying, e.g.:

```suggestion
| `spec.when.jira.jql` | Optional JQL filter appended to the default query; when set, the full query is `project = <project> AND (<jql>)`. `ORDER BY` clauses are automatically hoisted outside the parentheses, so `jql: "status = Open ORDER BY created DESC"` produces `project = PROJ AND (status = Open) ORDER BY created DESC`. | No |
```

How can I resolve this? If you propose a fix, please make it concise.

| `spec.when.jira.secretRef.name` | Secret containing `JIRA_TOKEN` (required) and optionally `JIRA_USER` for Jira Cloud Basic auth; omit `JIRA_USER` for Jira Data Center/Server Bearer auth | Yes (when using jira) |
| `spec.when.jira.pollInterval` | Per-source poll interval override (e.g., `"30s"`, `"5m"`); takes precedence over `spec.pollInterval` | No |
| `spec.when.cron.schedule` | Cron schedule expression (e.g., `"0 * * * *"`) | Yes (when using cron) |
| `spec.taskTemplate.type` | Agent type (`claude-code`, `codex`, `gemini`, `opencode`, or `cursor`) | Yes |
Expand Down
Loading