docs: document Jira TaskSpawner fields#1068
Conversation
Greptile SummaryThis PR adds four missing Jira Confidence Score: 5/5Safe to merge; all new rows are factually correct and match the API types. The only finding is a P2 style suggestion about documenting ORDER BY hoisting in the jql description. No logic errors, no missing fields, no inaccurate required/optional markings. P2-only findings do not reduce the score below 5. No files require special attention.
|
| Filename | Overview |
|---|---|
| docs/reference.md | Adds four accurate Jira field rows (baseUrl, project, jql, secretRef.name); jql description omits the ORDER BY hoisting behaviour that the implementation performs. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[spec.when.jira] --> B[baseUrl\nJira instance URL]
A --> C[project\nProject key e.g. PROJ]
A --> D[jql\nOptional JQL filter]
A --> E[secretRef.name\nK8s Secret reference]
A --> F[pollInterval\nPer-source override]
D -->|empty| G["project = <project>"]
D -->|set, no ORDER BY| H["project = <project> AND (<jql>)"]
D -->|set, with ORDER BY| I["project = <project> AND (<filter>) ORDER BY ..."]
E --> J[Secret read by spawner pod\nvia env vars at runtime]
J --> L{user credential present?}
L -->|Yes| M[Basic auth\nJira Cloud]
L -->|No| N[Bearer token auth\nJira DC/Server PAT]
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
docs/reference.md:184
**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 |
```
Reviews (1): Last reviewed commit: "docs: document Jira TaskSpawner fields" | Re-trigger Greptile
| | `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 | |
There was a problem hiding this 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.:
| | `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.
What type of PR is this?
/kind docs
What this PR does / why we need it:
Documents the missing Jira TaskSpawner source fields in
docs/reference.mdso users can configure Jira without reading the API types.Adds reference rows for:
spec.when.jira.baseUrlspec.when.jira.projectspec.when.jira.jqlspec.when.jira.secretRef.nameWhich issue(s) this PR is related to:
Fixes #1061
Also addresses part of #777
Special notes for your reviewer:
Kept this scoped to the field-level reference gap from #1061. Jira secret details already exist in
docs/integration.md.Does this PR introduce a user-facing change?