Skip to content

Commit 344ce20

Browse files
IgGusevmariadb-stefan-hinz
authored andcommitted
Fix reporting to jira burying pr link
1 parent 1a1edb0 commit 344ce20

2 files changed

Lines changed: 26 additions & 23 deletions

File tree

.claude/commands/jira-resolve.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ Run the **RESOLVE** procedure in `.claude/skills/jira/SKILL.md` for `$ARGUMENTS`
1212
- Resolve the key from the argument, or infer it from the current branch's `DOCS-XXXX` prefix.
1313
- Stop if the ticket is already in Review/Closed (idempotent).
1414
- Find the PR link (`gh pr view` or the `DOCS-XXXX` commit on `origin/main`); ask if none found.
15-
- Comment with the PR link (`contentFormat="markdown"`).
16-
- Post the **fact-check report** (found by key under `reports_dir`, grouped by space:
17-
`<space>/DOCS-XXXX/report.md`) as a second Markdown comment if it exists, set its `Status:` to
18-
`handed-off`, and regen `INDEX.md`; warn (and ask) if the doc ticket has no report.
15+
- Post **one combined Markdown comment**: the `**Docs PR:**` link pinned at the top, then the
16+
**fact-check report** (found by key under `reports_dir`, grouped by space:
17+
`<space>/DOCS-XXXX/report.md`) below a `---` divider if it exists. Keeping the link at the top of
18+
a single comment stops the long report from pushing it out of sight. Set the report's `Status:`
19+
to `handed-off` and regen `INDEX.md`; warn (and ask) if the doc ticket has no report (still post
20+
the PR-link line in that case).
1921
- Transition to **`Review`** (match by name). This does **not** close the ticket — the reviewer
2022
runs `/jira-close` after merge.
2123
- Confirm with `Ticket / Status: Review / PR link / report posted`.

.claude/skills/jira/SKILL.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -158,28 +158,29 @@ Use when the doc PR is open and ready for editorial review. Moves the ticket to
158158
git log origin/main --oneline --grep="DOCS-XXXX" -1
159159
```
160160
If none found, ask the user for the PR URL.
161-
4. **Comment with the PR/commit link** (Markdown):
162-
```
163-
addCommentToJiraIssue(cloudId, issueIdOrKey="DOCS-XXXX",
164-
commentBody="Docs PR: [<repo>#<n>](<pr-url>)", contentFormat="markdown")
165-
```
166-
`contentFormat="markdown"` is required or links render as literal text.
167-
5. **Post the fact-check report** (the paper trail — `dev-docs/cookbook-fact-trail.md`). Read
161+
4. **Locate the fact-check report** (the paper trail — `dev-docs/cookbook-fact-trail.md`). Read
168162
`reports_dir` from `.claude/doc-sources.local.json` and find the report by key (it's grouped by
169163
space, so don't assume a flat path):
170164
```bash
171165
report="$(find "$reports_dir" -type d -name 'DOCS-XXXX' -not -path '*/runs/*' | head -1)/report.md"
172166
```
173-
- If found, post its **full contents** as a second Markdown comment:
174-
```
175-
addCommentToJiraIssue(cloudId, issueIdOrKey="DOCS-XXXX",
176-
commentBody="### Fact-check report\n\n<report file contents>", contentFormat="markdown")
177-
```
178-
Then update the report's header `Status:` to `handed-off` and regenerate `INDEX.md` (cookbook).
179-
- If **not found**, don't fabricate one — warn the user that this ticket has no fact-check
180-
report (expected from `/doc-ticket`) and ask whether to resolve without it. A doc edit with
181-
no report is a gap, not a hard stop.
182-
- Skip silently for tickets that aren't doc-content edits (e.g. an Epic, a tooling task).
167+
5. **Post one combined comment** — PR link pinned at the top, report below a divider — so the
168+
`Docs PR:` line stays visible regardless of Jira's comment sort order and never gets buried
169+
under the (long) report:
170+
```
171+
addCommentToJiraIssue(cloudId, issueIdOrKey="DOCS-XXXX",
172+
commentBody="**Docs PR:** [<repo>#<n>](<pr-url>)\n\n---\n### Fact-check report\n\n<report file contents>",
173+
contentFormat="markdown")
174+
```
175+
`contentFormat="markdown"` is required or the link renders as literal text.
176+
- If the report was found, include its **full contents** after the divider, then update the
177+
report's header `Status:` to `handed-off` and regenerate `INDEX.md` (cookbook).
178+
- If **no report is found**, still post the `**Docs PR:**` line (drop the divider and report
179+
section), and warn the user that this ticket has no fact-check report (expected from
180+
`/doc-ticket`); ask whether to resolve without it. A doc edit with no report is a gap, not a
181+
hard stop.
182+
- For tickets that aren't doc-content edits (e.g. an Epic, a tooling task), post just the
183+
`**Docs PR:**` line and skip the report section silently.
183184
6. **Transition to `Review`** (id 2) — fetch live transitions, match by name.
184185
7. **Confirm**: `Ticket / Status: Review / PR link / report posted (yes|no)`.
185186

@@ -244,8 +245,8 @@ confirmed in chat before it is sent**.
244245
```
245246
- **`DOCS-XXXX`** → just that ticket (`getJiraIssue` with the same `fields`). If it isn't in
246247
**Review**, say so and stop — there's nothing to chase.
247-
3. **Identify the reviewer(s)** from the comment thread. The handoff comment (`Docs PR: …`, left
248-
by `/jira-resolve`) marks when review was requested; the reviewer is whoever was **@-mentioned
248+
3. **Identify the reviewer(s)** from the comment thread. The handoff comment (starts with
249+
`**Docs PR:** …`, left by `/jira-resolve`) marks when review was requested; the reviewer is whoever was **@-mentioned
249250
to review** there or named in a later comment. If no reviewer is identifiable, **don't
250251
guess** — list the ticket as *reviewer unclear* and ask the user who to chase.
251252
4. **Decide whether to skip.** A reviewer has **already responded** (skip them, noting why) if

0 commit comments

Comments
 (0)