JIRA Evidence Posting
Upload captured evidence and generated templates to GitHub PR description and JIRA ticket. This skill is the posting step — it assumes evidence files and comment templates already exist in the evidence directory.
Arguments
$ARGUMENTS: <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
TICKET_ID(required): JIRA ticket key (e.g.,PROJ-123)EVIDENCE_DIR(required): Directory containing evidence and templates (e.g.,./evidence)PR_NUMBER(required): GitHub PR number to update description
Prerequisites
JIRA_API_TOKENenvironment variable set- a jira-cli config —
.lisa/jira-cli/.config.ymlif thesetup-jira-cliSessionStart hook wrote one, otherwise~/.config/.jira/.config.yml.serverandloginare read from whichever is used, and the fallback is announced on stderr rather than taken silently. ghCLI authenticated- Evidence directory containing:
- Evidence files:
NN-name-viewport.png(screenshots) and/orNN-name.txt/NN-name.json(text evidence) comment.txt— JIRA wiki markup (generated bygenerate-templates.py)comment.md— GitHub markdown (generated bygenerate-templates.py)
- Evidence files:
Usage
bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
Example
bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
What It Does
- Read JIRA config — Resolves the jira-cli config (
$PROJECT_DIR/.lisa/jira-cli/.config.ymlfirst, then~/.config/.jira/.config.yml, announcing the fallback) and readsserverandloginfrom it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed tojira issue moveas--config, so the CLI cannot end up on a different config than the one this script parsed. - Upload to GitHub
pr-assetsrelease — Uploads evidence files viagh release upload --clobber, creating CDN URLs - Update PR description — Replaces or appends the
## Evidencesection in the PR body usinggh pr edit - Upload JIRA attachments — Uploads image evidence via REST API v3 so
!filename.png!wiki markup renders inline - Post JIRA comment — Posts
comment.txtas a new comment via REST API v2 (wiki markup) - Move ticket to the configured review status — Resolves
jira.workflow.review(or thejira.workflow.code_reviewalias) from.lisa.config.json/.lisa.config.local.jsonand transitions viajira issue move.reviewis optional; when unset, the ticket stays inclaimedand this step is skipped. Never transition to a status not named inconfig.jira.workflow. If the configured status is not a valid transition from the current state, log a warning and skip.
Evidence Naming Conventions
- Image evidence:
NN-name-viewport.png(e.g.,01-search-step-desktop.png) - Text evidence:
NN-name.txtorNN-name.json(e.g.,01-health-check.json)
Troubleshooting
Images not rendering in GitHub PR
Images must be in the pr-assets GitHub release. If the release does not exist, create it first:
gh release create pr-assets --title "PR Assets" --notes "CDN for PR evidence"
JIRA comment shows !filename.png! as text (not image)
The screenshot must be uploaded as a JIRA attachment before posting the comment. The script uploads attachments first then posts the comment.
JIRA API returns 403 on attachment upload
Ensure JIRA_API_TOKEN is set and login in the resolved jira-cli config (.lisa/jira-cli/.config.yml, else ~/.config/.jira/.config.yml) matches your Atlassian account email.