@codyswann/lisa 4.10.5 → 4.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codex/scripts/setup-jira-cli.sh +50 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +16 -15
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/lisa-session-bootstrap.ts +13 -0
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/lisa/hooks/setup-jira-cli.sh +50 -0
- package/plugins/lisa/rules/reference/base-rules.md +1 -1
- package/plugins/lisa/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/lisa/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/lisa/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-agy/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-agy/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-agy/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/lisa-agy/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/setup-jira-cli.sh +50 -0
- package/plugins/lisa-copilot/rules/reference/base-rules.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-copilot/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-copilot/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-copilot/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/lisa-copilot/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/setup-jira-cli.sh +50 -0
- package/plugins/lisa-cursor/rules/base-rules-reference.mdc +1 -1
- package/plugins/lisa-cursor/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-cursor/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-cursor/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-cursor/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/lisa-cursor/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-expo/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-expo/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-expo/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-expo/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-expo-agy/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-expo-agy/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-expo-agy/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-expo-copilot/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-expo-copilot/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-expo-copilot/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-expo-cursor/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-expo-cursor/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-expo-cursor/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-rails/.codex-plugin/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-rails/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-rails/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-rails/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-rails/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-agy/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-rails-agy/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-rails-agy/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-rails-agy/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-rails-copilot/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-rails-copilot/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-rails-copilot/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/lisa-rails-cursor/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/lisa-rails-cursor/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/lisa-rails-cursor/skills/jira-journey/SKILL.md +2 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/setup-jira-cli.sh +50 -0
- package/plugins/src/base/rules/reference/base-rules.md +1 -1
- package/plugins/src/base/skills/lisa-jira-add-journey/SKILL.md +16 -2
- package/plugins/src/base/skills/lisa-jira-evidence/SKILL.md +6 -3
- package/plugins/src/base/skills/lisa-jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/src/base/skills/lisa-jira-journey/SKILL.md +2 -1
- package/plugins/src/base/skills/lisa-jira-read-ticket/scripts/download-attachment.sh +53 -4
- package/plugins/src/expo/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/src/expo/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/src/expo/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/src/expo/skills/jira-journey/SKILL.md +2 -1
- package/plugins/src/rails/skills/jira-add-journey/SKILL.md +16 -2
- package/plugins/src/rails/skills/jira-evidence/SKILL.md +6 -3
- package/plugins/src/rails/skills/jira-evidence/scripts/post-evidence.sh +56 -5
- package/plugins/src/rails/skills/jira-journey/SKILL.md +2 -1
|
@@ -16,7 +16,12 @@ Read an existing JIRA ticket, analyze the change type, and generate a Validation
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
18
|
- `JIRA_API_TOKEN` environment variable set
|
|
19
|
-
- `jira-cli` configured
|
|
19
|
+
- `jira-cli` configured. Prefer the config Lisa writes at
|
|
20
|
+
`.lisa/jira-cli/.config.yml` (the `setup-jira-cli` SessionStart hook writes it
|
|
21
|
+
from `JIRA_SERVER` / `JIRA_LOGIN` / `JIRA_PROJECT` on a project whose
|
|
22
|
+
`tracker` is `jira`), and pass it explicitly with `--config`. A developer's
|
|
23
|
+
own `~/.config/.jira/.config.yml` still works as jira-cli's default when no
|
|
24
|
+
`--config` is given.
|
|
20
25
|
|
|
21
26
|
## Workflow
|
|
22
27
|
|
|
@@ -25,9 +30,18 @@ Read an existing JIRA ticket, analyze the change type, and generate a Validation
|
|
|
25
30
|
Use the Atlassian MCP or jira-cli to read the full ticket details:
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
jira
|
|
33
|
+
# Run from the project root. --config pins jira-cli to the file Lisa's
|
|
34
|
+
# setup-jira-cli hook wrote, instead of the machine's own ~/.config/.jira.
|
|
35
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/.config.yml,
|
|
36
|
+
# and a --config path that does not exist fails closed with "Missing
|
|
37
|
+
# configuration file." rather than silently using the default.
|
|
38
|
+
jira --config .lisa/jira-cli/.config.yml issue view <TICKET_ID>
|
|
29
39
|
```
|
|
30
40
|
|
|
41
|
+
If `.lisa/jira-cli/.config.yml` does not exist, drop `--config` to fall back to
|
|
42
|
+
the machine's own jira-cli config — but say so in your report rather than
|
|
43
|
+
letting the Lisa-written config go quietly unused.
|
|
44
|
+
|
|
31
45
|
Extract: title, description, acceptance criteria, components, labels, linked tickets.
|
|
32
46
|
|
|
33
47
|
### Step 2: Check for Existing Journey
|
|
@@ -35,7 +35,10 @@ Upload captured evidence and generated templates to GitHub PR description and JI
|
|
|
35
35
|
## Prerequisites
|
|
36
36
|
|
|
37
37
|
- `JIRA_API_TOKEN` environment variable set
|
|
38
|
-
-
|
|
38
|
+
- a jira-cli config — `.lisa/jira-cli/.config.yml` if the `setup-jira-cli`
|
|
39
|
+
SessionStart hook wrote one, otherwise `~/.config/.jira/.config.yml`. `server`
|
|
40
|
+
and `login` are read from whichever is used, and the fallback is announced on
|
|
41
|
+
stderr rather than taken silently.
|
|
39
42
|
- `gh` CLI authenticated
|
|
40
43
|
- Evidence directory containing:
|
|
41
44
|
- `NN-name.txt` or `NN-name.json` text evidence files (e.g., `01-health-check.json`)
|
|
@@ -66,7 +69,7 @@ bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 4
|
|
|
66
69
|
|
|
67
70
|
## What It Does
|
|
68
71
|
|
|
69
|
-
1. **Read JIRA config** —
|
|
72
|
+
1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
|
|
70
73
|
2. **Upload to GitHub `pr-assets` release** — Uploads evidence files via `gh release upload --clobber`
|
|
71
74
|
3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body
|
|
72
75
|
4. **Post JIRA comment** — Posts `comment.txt` as a new comment (wiki markup with code blocks)
|
|
@@ -97,4 +100,4 @@ gh release create pr-assets --title "PR Assets" --notes "CDN for PR evidence"
|
|
|
97
100
|
|
|
98
101
|
### JIRA API returns 403
|
|
99
102
|
|
|
100
|
-
Ensure `JIRA_API_TOKEN` is set and `login` in `~/.config/.jira/.config.yml` matches your Atlassian account email.
|
|
103
|
+
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.
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
#
|
|
7
7
|
# Prerequisites:
|
|
8
8
|
# - JIRA_API_TOKEN env var set
|
|
9
|
-
# - jira-cli
|
|
9
|
+
# - a jira-cli config, resolved in this order (see "CONFIG RESOLUTION" below):
|
|
10
|
+
# 1. ${PROJECT_DIR}/.lisa/jira-cli/.config.yml (written by the
|
|
11
|
+
# setup-jira-cli SessionStart hook from the JIRA_* environment)
|
|
12
|
+
# 2. ~/.config/.jira/.config.yml (a developer's own
|
|
13
|
+
# `jira init` config; announced on stderr when it is used)
|
|
10
14
|
# - gh CLI authenticated
|
|
11
15
|
#
|
|
12
16
|
# What it does:
|
|
@@ -23,9 +27,50 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
|
23
27
|
EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
24
28
|
PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
# CONFIG RESOLUTION
|
|
32
|
+
#
|
|
33
|
+
# The setup-jira-cli SessionStart hook writes ${PROJECT_DIR}/.lisa/jira-cli/
|
|
34
|
+
# .config.yml. Nothing read it — this script looked only at the developer's own
|
|
35
|
+
# ~/.config/.jira/.config.yml and exited 1 telling the operator to run
|
|
36
|
+
# `jira init`, so on a headless JIRA project the hook was an inert control.
|
|
37
|
+
# See CodySwannGT/lisa#2767.
|
|
38
|
+
#
|
|
39
|
+
# PROJECT_DIR is resolved with the same rule as the hook that writes the file,
|
|
40
|
+
# deliberately character-for-character: CLAUDE_PROJECT_DIR (the harness's own
|
|
41
|
+
# declaration of the root, inert on harnesses that never set it), then the git
|
|
42
|
+
# toplevel, then pwd. A session launched from a subdirectory otherwise reads a
|
|
43
|
+
# directory it never wrote — the #2768 defect, on the read side.
|
|
44
|
+
#
|
|
45
|
+
# Nothing here writes to ~/.config/.jira. That file is a developer's personal
|
|
46
|
+
# jira-cli state; it is read as a fallback and never created or modified.
|
|
47
|
+
#
|
|
48
|
+
# NOTE: the `.lisa.config.json` reads in Step 5 below are still resolved from
|
|
49
|
+
# the process working directory. That is pre-existing and out of scope here.
|
|
50
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-}"
|
|
52
|
+
if [[ -z "${PROJECT_DIR}" || ! -d "${PROJECT_DIR}" ]]; then
|
|
53
|
+
PROJECT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
54
|
+
fi
|
|
55
|
+
PROJECT_JIRA_CONFIG="${PROJECT_DIR}/.lisa/jira-cli/.config.yml"
|
|
56
|
+
HOME_JIRA_CONFIG="${HOME}/.config/.jira/.config.yml"
|
|
57
|
+
|
|
58
|
+
if [[ -f "$PROJECT_JIRA_CONFIG" ]]; then
|
|
59
|
+
JIRA_CONFIG="$PROJECT_JIRA_CONFIG"
|
|
60
|
+
elif [[ -f "$HOME_JIRA_CONFIG" ]]; then
|
|
61
|
+
# Announced, never silent. A silent fall-through to the developer's own file
|
|
62
|
+
# is precisely how the Lisa-written config stayed unconsumed without anyone
|
|
63
|
+
# noticing, and on a headless runner there is no such file to fall back to.
|
|
64
|
+
echo "NOTE: no Lisa-written jira-cli config at $PROJECT_JIRA_CONFIG" >&2
|
|
65
|
+
echo " falling back to the developer config at $HOME_JIRA_CONFIG" >&2
|
|
66
|
+
JIRA_CONFIG="$HOME_JIRA_CONFIG"
|
|
67
|
+
else
|
|
68
|
+
echo "ERROR: jira-cli config not found." >&2
|
|
69
|
+
echo " Lisa-written config (expected): $PROJECT_JIRA_CONFIG" >&2
|
|
70
|
+
echo " developer config (fallback): $HOME_JIRA_CONFIG" >&2
|
|
71
|
+
echo " Fix: export JIRA_SERVER, JIRA_LOGIN (and JIRA_INSTALLATION," >&2
|
|
72
|
+
echo " JIRA_PROJECT) and start a new session so the setup-jira-cli hook" >&2
|
|
73
|
+
echo " writes the project config — or run 'jira init' locally." >&2
|
|
29
74
|
exit 1
|
|
30
75
|
fi
|
|
31
76
|
JIRA_SERVER=$(grep '^server:' "$JIRA_CONFIG" | awk '{print $2}')
|
|
@@ -169,7 +214,13 @@ fi
|
|
|
169
214
|
echo ""
|
|
170
215
|
if [ -n "$REVIEW" ]; then
|
|
171
216
|
echo "==> Moving $TICKET_ID to $REVIEW..."
|
|
172
|
-
|
|
217
|
+
# --config pins jira-cli to the same file this script parsed above.
|
|
218
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/
|
|
219
|
+
# .config.yml, and a --config path that does not exist fails closed
|
|
220
|
+
# rather than falling back (measured against jira-cli v1.7.0). The flag
|
|
221
|
+
# needs no environment export, so this works identically on every
|
|
222
|
+
# harness — see the harness note in the setup-jira-cli hook.
|
|
223
|
+
jira --config "$JIRA_CONFIG" issue move "$TICKET_ID" "$REVIEW" 2>&1 && echo " ✓ Ticket moved to $REVIEW" || echo " WARNING: Could not move ticket to $REVIEW (not a valid transition?); leaving in current status" >&2
|
|
173
224
|
else
|
|
174
225
|
echo "==> No jira.workflow.review configured; leaving $TICKET_ID in its current (claimed) status per config-resolution."
|
|
175
226
|
fi
|
|
@@ -20,7 +20,8 @@ Parse a JIRA ticket's Validation Journey, execute the verification steps using t
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
22
22
|
- `JIRA_API_TOKEN` environment variable set
|
|
23
|
-
- `jira-cli` configured
|
|
23
|
+
- `jira-cli` configured — `.lisa/jira-cli/.config.yml` (written by the
|
|
24
|
+
`setup-jira-cli` SessionStart hook) or `~/.config/.jira/.config.yml`
|
|
24
25
|
- `gh` CLI authenticated
|
|
25
26
|
- Appropriate services running for the verification type (dev server, database, etc.)
|
|
26
27
|
|
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
# JIRA_LOGIN - login email
|
|
20
20
|
# JIRA_API_TOKEN - API token (https://id.atlassian.com/manage-profile/security/api-tokens)
|
|
21
21
|
#
|
|
22
|
+
# JIRA_SERVER and JIRA_LOGIN each fall back to a jira-cli config when unset:
|
|
23
|
+
# ${PROJECT_DIR}/.lisa/jira-cli/.config.yml (written by the setup-jira-cli
|
|
24
|
+
# SessionStart hook) first, then ${HOME}/.config/.jira/.config.yml, with the
|
|
25
|
+
# fallback announced on stderr. When BOTH env vars are set, no config file is
|
|
26
|
+
# opened at all. JIRA_API_TOKEN has no config fallback — it is a secret and
|
|
27
|
+
# is never written to the jira-cli config.
|
|
28
|
+
#
|
|
22
29
|
# Exit codes:
|
|
23
30
|
# 0 success
|
|
24
31
|
# 1 download failed (HTTP error)
|
|
@@ -34,12 +41,54 @@ fi
|
|
|
34
41
|
ID_OR_URL="$1"
|
|
35
42
|
OUTPUT_PATH="$2"
|
|
36
43
|
|
|
37
|
-
#
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
45
|
+
# Resolve credentials: prefer env, fall back to a jira-cli config for
|
|
46
|
+
# server/login.
|
|
47
|
+
#
|
|
48
|
+
# The env-first arm is load-bearing and unchanged: a headless environment that
|
|
49
|
+
# exports JIRA_SERVER and JIRA_LOGIN never opens a config file at all. The
|
|
50
|
+
# resolution below is therefore gated on actually needing it.
|
|
51
|
+
#
|
|
52
|
+
# What changed (CodySwannGT/lisa#2767): the fallback looked only at the
|
|
53
|
+
# developer's own ~/.config/.jira/.config.yml. The setup-jira-cli SessionStart
|
|
54
|
+
# hook writes ${PROJECT_DIR}/.lisa/jira-cli/.config.yml, which nothing read —
|
|
55
|
+
# so on a headless JIRA project with the JIRA_* vars absent, the file Lisa had
|
|
56
|
+
# just written was ignored and this script exited 2. The Lisa-written config is
|
|
57
|
+
# now preferred, with the developer config kept as an announced fallback.
|
|
58
|
+
#
|
|
59
|
+
# PROJECT_DIR uses the same rule as the hook that writes the file:
|
|
60
|
+
# CLAUDE_PROJECT_DIR, then the git toplevel, then pwd. Resolving from the
|
|
61
|
+
# process working directory instead would reintroduce #2768 on the read side.
|
|
62
|
+
#
|
|
63
|
+
# Nothing here writes to ~/.config/.jira — it is read, never created.
|
|
64
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
65
|
+
JIRA_CONFIG=""
|
|
66
|
+
if [[ -z "${JIRA_SERVER:-}" || -z "${JIRA_LOGIN:-}" ]]; then
|
|
67
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-}"
|
|
68
|
+
if [[ -z "${PROJECT_DIR}" || ! -d "${PROJECT_DIR}" ]]; then
|
|
69
|
+
PROJECT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
70
|
+
fi
|
|
71
|
+
PROJECT_JIRA_CONFIG="${PROJECT_DIR}/.lisa/jira-cli/.config.yml"
|
|
72
|
+
HOME_JIRA_CONFIG="${HOME}/.config/.jira/.config.yml"
|
|
73
|
+
|
|
74
|
+
if [[ -f "$PROJECT_JIRA_CONFIG" ]]; then
|
|
75
|
+
JIRA_CONFIG="$PROJECT_JIRA_CONFIG"
|
|
76
|
+
elif [[ -f "$HOME_JIRA_CONFIG" ]]; then
|
|
77
|
+
# Announced, never silent — a quiet fall-through to the developer's own
|
|
78
|
+
# file is how the Lisa-written config stayed unconsumed unnoticed.
|
|
79
|
+
echo "NOTE: no Lisa-written jira-cli config at $PROJECT_JIRA_CONFIG" >&2
|
|
80
|
+
echo " falling back to the developer config at $HOME_JIRA_CONFIG" >&2
|
|
81
|
+
JIRA_CONFIG="$HOME_JIRA_CONFIG"
|
|
82
|
+
else
|
|
83
|
+
echo "NOTE: no jira-cli config at $PROJECT_JIRA_CONFIG" >&2
|
|
84
|
+
echo " or $HOME_JIRA_CONFIG; relying on the environment alone." >&2
|
|
85
|
+
fi
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
if [[ -z "${JIRA_SERVER:-}" && -n "$JIRA_CONFIG" ]]; then
|
|
40
89
|
JIRA_SERVER=$(grep '^server:' "$JIRA_CONFIG" | awk '{print $2}')
|
|
41
90
|
fi
|
|
42
|
-
if [[ -z "${JIRA_LOGIN:-}" && -
|
|
91
|
+
if [[ -z "${JIRA_LOGIN:-}" && -n "$JIRA_CONFIG" ]]; then
|
|
43
92
|
JIRA_LOGIN=$(grep '^login:' "$JIRA_CONFIG" | awk '{print $2}')
|
|
44
93
|
fi
|
|
45
94
|
|
|
@@ -16,7 +16,12 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
18
|
- `JIRA_API_TOKEN` environment variable set
|
|
19
|
-
- `jira-cli` configured
|
|
19
|
+
- `jira-cli` configured. Prefer the config Lisa writes at
|
|
20
|
+
`.lisa/jira-cli/.config.yml` (the `setup-jira-cli` SessionStart hook writes it
|
|
21
|
+
from `JIRA_SERVER` / `JIRA_LOGIN` / `JIRA_PROJECT` on a project whose
|
|
22
|
+
`tracker` is `jira`), and pass it explicitly with `--config`. A developer's
|
|
23
|
+
own `~/.config/.jira/.config.yml` still works as jira-cli's default when no
|
|
24
|
+
`--config` is given.
|
|
20
25
|
|
|
21
26
|
## Workflow
|
|
22
27
|
|
|
@@ -25,9 +30,18 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
25
30
|
Use the Atlassian MCP or jira-cli to read the full ticket details:
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
jira
|
|
33
|
+
# Run from the project root. --config pins jira-cli to the file Lisa's
|
|
34
|
+
# setup-jira-cli hook wrote, instead of the machine's own ~/.config/.jira.
|
|
35
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/.config.yml,
|
|
36
|
+
# and a --config path that does not exist fails closed with "Missing
|
|
37
|
+
# configuration file." rather than silently using the default.
|
|
38
|
+
jira --config .lisa/jira-cli/.config.yml issue view <TICKET_ID>
|
|
29
39
|
```
|
|
30
40
|
|
|
41
|
+
If `.lisa/jira-cli/.config.yml` does not exist, drop `--config` to fall back to
|
|
42
|
+
the machine's own jira-cli config — but say so in your report rather than
|
|
43
|
+
letting the Lisa-written config go quietly unused.
|
|
44
|
+
|
|
31
45
|
Extract:
|
|
32
46
|
- Title and description (what the feature/fix is)
|
|
33
47
|
- Acceptance criteria (what needs to be verified)
|
|
@@ -18,7 +18,10 @@ Upload captured screenshots and generated templates to GitHub PR description and
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
20
|
- `JIRA_API_TOKEN` environment variable set
|
|
21
|
-
-
|
|
21
|
+
- a jira-cli config — `.lisa/jira-cli/.config.yml` if the `setup-jira-cli`
|
|
22
|
+
SessionStart hook wrote one, otherwise `~/.config/.jira/.config.yml`. `server`
|
|
23
|
+
and `login` are read from whichever is used, and the fallback is announced on
|
|
24
|
+
stderr rather than taken silently.
|
|
22
25
|
- `gh` CLI authenticated
|
|
23
26
|
- Evidence directory containing:
|
|
24
27
|
- `NN-name-viewport.png` screenshots (numbered, e.g., `01-search-step-desktop.png`)
|
|
@@ -39,7 +42,7 @@ bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 4
|
|
|
39
42
|
|
|
40
43
|
## What It Does
|
|
41
44
|
|
|
42
|
-
1. **Read JIRA config** —
|
|
45
|
+
1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
|
|
43
46
|
2. **Upload to GitHub `pr-assets` release** — Uploads `NN-name-viewport.png` screenshots via `gh release upload --clobber`, creating CDN URLs that render in GitHub markdown
|
|
44
47
|
3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body using `gh pr edit`
|
|
45
48
|
4. **Upload JIRA attachments** — Uploads screenshots via REST API v3 so `!filename.png!` wiki markup renders inline
|
|
@@ -75,4 +78,4 @@ The screenshot must be uploaded as a JIRA attachment before posting the comment.
|
|
|
75
78
|
|
|
76
79
|
### JIRA API returns 403 on attachment upload
|
|
77
80
|
|
|
78
|
-
Ensure `JIRA_API_TOKEN` is set and `login` in `~/.config/.jira/.config.yml` matches your Atlassian account email.
|
|
81
|
+
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.
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
#
|
|
7
7
|
# Prerequisites:
|
|
8
8
|
# - JIRA_API_TOKEN env var set
|
|
9
|
-
# - jira-cli
|
|
9
|
+
# - a jira-cli config, resolved in this order (see "CONFIG RESOLUTION" below):
|
|
10
|
+
# 1. ${PROJECT_DIR}/.lisa/jira-cli/.config.yml (written by the
|
|
11
|
+
# setup-jira-cli SessionStart hook from the JIRA_* environment)
|
|
12
|
+
# 2. ~/.config/.jira/.config.yml (a developer's own
|
|
13
|
+
# `jira init` config; announced on stderr when it is used)
|
|
10
14
|
# - gh CLI authenticated
|
|
11
15
|
#
|
|
12
16
|
# What it does:
|
|
@@ -23,9 +27,50 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
|
23
27
|
EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
24
28
|
PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
# CONFIG RESOLUTION
|
|
32
|
+
#
|
|
33
|
+
# The setup-jira-cli SessionStart hook writes ${PROJECT_DIR}/.lisa/jira-cli/
|
|
34
|
+
# .config.yml. Nothing read it — this script looked only at the developer's own
|
|
35
|
+
# ~/.config/.jira/.config.yml and exited 1 telling the operator to run
|
|
36
|
+
# `jira init`, so on a headless JIRA project the hook was an inert control.
|
|
37
|
+
# See CodySwannGT/lisa#2767.
|
|
38
|
+
#
|
|
39
|
+
# PROJECT_DIR is resolved with the same rule as the hook that writes the file,
|
|
40
|
+
# deliberately character-for-character: CLAUDE_PROJECT_DIR (the harness's own
|
|
41
|
+
# declaration of the root, inert on harnesses that never set it), then the git
|
|
42
|
+
# toplevel, then pwd. A session launched from a subdirectory otherwise reads a
|
|
43
|
+
# directory it never wrote — the #2768 defect, on the read side.
|
|
44
|
+
#
|
|
45
|
+
# Nothing here writes to ~/.config/.jira. That file is a developer's personal
|
|
46
|
+
# jira-cli state; it is read as a fallback and never created or modified.
|
|
47
|
+
#
|
|
48
|
+
# NOTE: the `.lisa.config.json` reads in Step 5 below are still resolved from
|
|
49
|
+
# the process working directory. That is pre-existing and out of scope here.
|
|
50
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-}"
|
|
52
|
+
if [[ -z "${PROJECT_DIR}" || ! -d "${PROJECT_DIR}" ]]; then
|
|
53
|
+
PROJECT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
54
|
+
fi
|
|
55
|
+
PROJECT_JIRA_CONFIG="${PROJECT_DIR}/.lisa/jira-cli/.config.yml"
|
|
56
|
+
HOME_JIRA_CONFIG="${HOME}/.config/.jira/.config.yml"
|
|
57
|
+
|
|
58
|
+
if [[ -f "$PROJECT_JIRA_CONFIG" ]]; then
|
|
59
|
+
JIRA_CONFIG="$PROJECT_JIRA_CONFIG"
|
|
60
|
+
elif [[ -f "$HOME_JIRA_CONFIG" ]]; then
|
|
61
|
+
# Announced, never silent. A silent fall-through to the developer's own file
|
|
62
|
+
# is precisely how the Lisa-written config stayed unconsumed without anyone
|
|
63
|
+
# noticing, and on a headless runner there is no such file to fall back to.
|
|
64
|
+
echo "NOTE: no Lisa-written jira-cli config at $PROJECT_JIRA_CONFIG" >&2
|
|
65
|
+
echo " falling back to the developer config at $HOME_JIRA_CONFIG" >&2
|
|
66
|
+
JIRA_CONFIG="$HOME_JIRA_CONFIG"
|
|
67
|
+
else
|
|
68
|
+
echo "ERROR: jira-cli config not found." >&2
|
|
69
|
+
echo " Lisa-written config (expected): $PROJECT_JIRA_CONFIG" >&2
|
|
70
|
+
echo " developer config (fallback): $HOME_JIRA_CONFIG" >&2
|
|
71
|
+
echo " Fix: export JIRA_SERVER, JIRA_LOGIN (and JIRA_INSTALLATION," >&2
|
|
72
|
+
echo " JIRA_PROJECT) and start a new session so the setup-jira-cli hook" >&2
|
|
73
|
+
echo " writes the project config — or run 'jira init' locally." >&2
|
|
29
74
|
exit 1
|
|
30
75
|
fi
|
|
31
76
|
JIRA_SERVER=$(grep '^server:' "$JIRA_CONFIG" | awk '{print $2}')
|
|
@@ -169,7 +214,13 @@ fi
|
|
|
169
214
|
echo ""
|
|
170
215
|
if [ -n "$REVIEW" ]; then
|
|
171
216
|
echo "==> Moving $TICKET_ID to $REVIEW..."
|
|
172
|
-
|
|
217
|
+
# --config pins jira-cli to the same file this script parsed above.
|
|
218
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/
|
|
219
|
+
# .config.yml, and a --config path that does not exist fails closed
|
|
220
|
+
# rather than falling back (measured against jira-cli v1.7.0). The flag
|
|
221
|
+
# needs no environment export, so this works identically on every
|
|
222
|
+
# harness — see the harness note in the setup-jira-cli hook.
|
|
223
|
+
jira --config "$JIRA_CONFIG" issue move "$TICKET_ID" "$REVIEW" 2>&1 && echo " ✓ Ticket moved to $REVIEW" || echo " WARNING: Could not move ticket to $REVIEW (not a valid transition?); leaving in current status" >&2
|
|
173
224
|
else
|
|
174
225
|
echo "==> No jira.workflow.review configured; leaving $TICKET_ID in its current (claimed) status per config-resolution."
|
|
175
226
|
fi
|
|
@@ -17,7 +17,8 @@ Read a JIRA ticket's Validation Journey, execute it via Playwright MCP browser t
|
|
|
17
17
|
## Prerequisites
|
|
18
18
|
|
|
19
19
|
- `JIRA_API_TOKEN` environment variable set
|
|
20
|
-
- `jira-cli` configured
|
|
20
|
+
- `jira-cli` configured — `.lisa/jira-cli/.config.yml` (written by the
|
|
21
|
+
`setup-jira-cli` SessionStart hook) or `~/.config/.jira/.config.yml`
|
|
21
22
|
- `gh` CLI authenticated
|
|
22
23
|
- Playwright MCP server running (browser tools available)
|
|
23
24
|
- Dev server running
|
|
@@ -16,7 +16,12 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
18
|
- `JIRA_API_TOKEN` environment variable set
|
|
19
|
-
- `jira-cli` configured
|
|
19
|
+
- `jira-cli` configured. Prefer the config Lisa writes at
|
|
20
|
+
`.lisa/jira-cli/.config.yml` (the `setup-jira-cli` SessionStart hook writes it
|
|
21
|
+
from `JIRA_SERVER` / `JIRA_LOGIN` / `JIRA_PROJECT` on a project whose
|
|
22
|
+
`tracker` is `jira`), and pass it explicitly with `--config`. A developer's
|
|
23
|
+
own `~/.config/.jira/.config.yml` still works as jira-cli's default when no
|
|
24
|
+
`--config` is given.
|
|
20
25
|
|
|
21
26
|
## Workflow
|
|
22
27
|
|
|
@@ -25,9 +30,18 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
25
30
|
Use the Atlassian MCP or jira-cli to read the full ticket details:
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
jira
|
|
33
|
+
# Run from the project root. --config pins jira-cli to the file Lisa's
|
|
34
|
+
# setup-jira-cli hook wrote, instead of the machine's own ~/.config/.jira.
|
|
35
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/.config.yml,
|
|
36
|
+
# and a --config path that does not exist fails closed with "Missing
|
|
37
|
+
# configuration file." rather than silently using the default.
|
|
38
|
+
jira --config .lisa/jira-cli/.config.yml issue view <TICKET_ID>
|
|
29
39
|
```
|
|
30
40
|
|
|
41
|
+
If `.lisa/jira-cli/.config.yml` does not exist, drop `--config` to fall back to
|
|
42
|
+
the machine's own jira-cli config — but say so in your report rather than
|
|
43
|
+
letting the Lisa-written config go quietly unused.
|
|
44
|
+
|
|
31
45
|
Extract:
|
|
32
46
|
- Title and description (what the feature/fix is)
|
|
33
47
|
- Acceptance criteria (what needs to be verified)
|
|
@@ -18,7 +18,10 @@ Upload captured screenshots and generated templates to GitHub PR description and
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
20
|
- `JIRA_API_TOKEN` environment variable set
|
|
21
|
-
-
|
|
21
|
+
- a jira-cli config — `.lisa/jira-cli/.config.yml` if the `setup-jira-cli`
|
|
22
|
+
SessionStart hook wrote one, otherwise `~/.config/.jira/.config.yml`. `server`
|
|
23
|
+
and `login` are read from whichever is used, and the fallback is announced on
|
|
24
|
+
stderr rather than taken silently.
|
|
22
25
|
- `gh` CLI authenticated
|
|
23
26
|
- Evidence directory containing:
|
|
24
27
|
- `NN-name-viewport.png` screenshots (numbered, e.g., `01-search-step-desktop.png`)
|
|
@@ -39,7 +42,7 @@ bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 4
|
|
|
39
42
|
|
|
40
43
|
## What It Does
|
|
41
44
|
|
|
42
|
-
1. **Read JIRA config** —
|
|
45
|
+
1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
|
|
43
46
|
2. **Upload to GitHub `pr-assets` release** — Uploads `NN-name-viewport.png` screenshots via `gh release upload --clobber`, creating CDN URLs that render in GitHub markdown
|
|
44
47
|
3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body using `gh pr edit`
|
|
45
48
|
4. **Upload JIRA attachments** — Uploads screenshots via REST API v3 so `!filename.png!` wiki markup renders inline
|
|
@@ -75,4 +78,4 @@ The screenshot must be uploaded as a JIRA attachment before posting the comment.
|
|
|
75
78
|
|
|
76
79
|
### JIRA API returns 403 on attachment upload
|
|
77
80
|
|
|
78
|
-
Ensure `JIRA_API_TOKEN` is set and `login` in `~/.config/.jira/.config.yml` matches your Atlassian account email.
|
|
81
|
+
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.
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
#
|
|
7
7
|
# Prerequisites:
|
|
8
8
|
# - JIRA_API_TOKEN env var set
|
|
9
|
-
# - jira-cli
|
|
9
|
+
# - a jira-cli config, resolved in this order (see "CONFIG RESOLUTION" below):
|
|
10
|
+
# 1. ${PROJECT_DIR}/.lisa/jira-cli/.config.yml (written by the
|
|
11
|
+
# setup-jira-cli SessionStart hook from the JIRA_* environment)
|
|
12
|
+
# 2. ~/.config/.jira/.config.yml (a developer's own
|
|
13
|
+
# `jira init` config; announced on stderr when it is used)
|
|
10
14
|
# - gh CLI authenticated
|
|
11
15
|
#
|
|
12
16
|
# What it does:
|
|
@@ -23,9 +27,50 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
|
23
27
|
EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
24
28
|
PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
# CONFIG RESOLUTION
|
|
32
|
+
#
|
|
33
|
+
# The setup-jira-cli SessionStart hook writes ${PROJECT_DIR}/.lisa/jira-cli/
|
|
34
|
+
# .config.yml. Nothing read it — this script looked only at the developer's own
|
|
35
|
+
# ~/.config/.jira/.config.yml and exited 1 telling the operator to run
|
|
36
|
+
# `jira init`, so on a headless JIRA project the hook was an inert control.
|
|
37
|
+
# See CodySwannGT/lisa#2767.
|
|
38
|
+
#
|
|
39
|
+
# PROJECT_DIR is resolved with the same rule as the hook that writes the file,
|
|
40
|
+
# deliberately character-for-character: CLAUDE_PROJECT_DIR (the harness's own
|
|
41
|
+
# declaration of the root, inert on harnesses that never set it), then the git
|
|
42
|
+
# toplevel, then pwd. A session launched from a subdirectory otherwise reads a
|
|
43
|
+
# directory it never wrote — the #2768 defect, on the read side.
|
|
44
|
+
#
|
|
45
|
+
# Nothing here writes to ~/.config/.jira. That file is a developer's personal
|
|
46
|
+
# jira-cli state; it is read as a fallback and never created or modified.
|
|
47
|
+
#
|
|
48
|
+
# NOTE: the `.lisa.config.json` reads in Step 5 below are still resolved from
|
|
49
|
+
# the process working directory. That is pre-existing and out of scope here.
|
|
50
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-}"
|
|
52
|
+
if [[ -z "${PROJECT_DIR}" || ! -d "${PROJECT_DIR}" ]]; then
|
|
53
|
+
PROJECT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
54
|
+
fi
|
|
55
|
+
PROJECT_JIRA_CONFIG="${PROJECT_DIR}/.lisa/jira-cli/.config.yml"
|
|
56
|
+
HOME_JIRA_CONFIG="${HOME}/.config/.jira/.config.yml"
|
|
57
|
+
|
|
58
|
+
if [[ -f "$PROJECT_JIRA_CONFIG" ]]; then
|
|
59
|
+
JIRA_CONFIG="$PROJECT_JIRA_CONFIG"
|
|
60
|
+
elif [[ -f "$HOME_JIRA_CONFIG" ]]; then
|
|
61
|
+
# Announced, never silent. A silent fall-through to the developer's own file
|
|
62
|
+
# is precisely how the Lisa-written config stayed unconsumed without anyone
|
|
63
|
+
# noticing, and on a headless runner there is no such file to fall back to.
|
|
64
|
+
echo "NOTE: no Lisa-written jira-cli config at $PROJECT_JIRA_CONFIG" >&2
|
|
65
|
+
echo " falling back to the developer config at $HOME_JIRA_CONFIG" >&2
|
|
66
|
+
JIRA_CONFIG="$HOME_JIRA_CONFIG"
|
|
67
|
+
else
|
|
68
|
+
echo "ERROR: jira-cli config not found." >&2
|
|
69
|
+
echo " Lisa-written config (expected): $PROJECT_JIRA_CONFIG" >&2
|
|
70
|
+
echo " developer config (fallback): $HOME_JIRA_CONFIG" >&2
|
|
71
|
+
echo " Fix: export JIRA_SERVER, JIRA_LOGIN (and JIRA_INSTALLATION," >&2
|
|
72
|
+
echo " JIRA_PROJECT) and start a new session so the setup-jira-cli hook" >&2
|
|
73
|
+
echo " writes the project config — or run 'jira init' locally." >&2
|
|
29
74
|
exit 1
|
|
30
75
|
fi
|
|
31
76
|
JIRA_SERVER=$(grep '^server:' "$JIRA_CONFIG" | awk '{print $2}')
|
|
@@ -169,7 +214,13 @@ fi
|
|
|
169
214
|
echo ""
|
|
170
215
|
if [ -n "$REVIEW" ]; then
|
|
171
216
|
echo "==> Moving $TICKET_ID to $REVIEW..."
|
|
172
|
-
|
|
217
|
+
# --config pins jira-cli to the same file this script parsed above.
|
|
218
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/
|
|
219
|
+
# .config.yml, and a --config path that does not exist fails closed
|
|
220
|
+
# rather than falling back (measured against jira-cli v1.7.0). The flag
|
|
221
|
+
# needs no environment export, so this works identically on every
|
|
222
|
+
# harness — see the harness note in the setup-jira-cli hook.
|
|
223
|
+
jira --config "$JIRA_CONFIG" issue move "$TICKET_ID" "$REVIEW" 2>&1 && echo " ✓ Ticket moved to $REVIEW" || echo " WARNING: Could not move ticket to $REVIEW (not a valid transition?); leaving in current status" >&2
|
|
173
224
|
else
|
|
174
225
|
echo "==> No jira.workflow.review configured; leaving $TICKET_ID in its current (claimed) status per config-resolution."
|
|
175
226
|
fi
|
|
@@ -17,7 +17,8 @@ Read a JIRA ticket's Validation Journey, execute it via Playwright MCP browser t
|
|
|
17
17
|
## Prerequisites
|
|
18
18
|
|
|
19
19
|
- `JIRA_API_TOKEN` environment variable set
|
|
20
|
-
- `jira-cli` configured
|
|
20
|
+
- `jira-cli` configured — `.lisa/jira-cli/.config.yml` (written by the
|
|
21
|
+
`setup-jira-cli` SessionStart hook) or `~/.config/.jira/.config.yml`
|
|
21
22
|
- `gh` CLI authenticated
|
|
22
23
|
- Playwright MCP server running (browser tools available)
|
|
23
24
|
- Dev server running
|
|
@@ -16,7 +16,12 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
18
|
- `JIRA_API_TOKEN` environment variable set
|
|
19
|
-
- `jira-cli` configured
|
|
19
|
+
- `jira-cli` configured. Prefer the config Lisa writes at
|
|
20
|
+
`.lisa/jira-cli/.config.yml` (the `setup-jira-cli` SessionStart hook writes it
|
|
21
|
+
from `JIRA_SERVER` / `JIRA_LOGIN` / `JIRA_PROJECT` on a project whose
|
|
22
|
+
`tracker` is `jira`), and pass it explicitly with `--config`. A developer's
|
|
23
|
+
own `~/.config/.jira/.config.yml` still works as jira-cli's default when no
|
|
24
|
+
`--config` is given.
|
|
20
25
|
|
|
21
26
|
## Workflow
|
|
22
27
|
|
|
@@ -25,9 +30,18 @@ Read an existing JIRA ticket, understand the feature or fix it describes, analyz
|
|
|
25
30
|
Use the Atlassian MCP or jira-cli to read the full ticket details:
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
jira
|
|
33
|
+
# Run from the project root. --config pins jira-cli to the file Lisa's
|
|
34
|
+
# setup-jira-cli hook wrote, instead of the machine's own ~/.config/.jira.
|
|
35
|
+
# jira-cli resolves --config > JIRA_CONFIG_FILE > ~/.config/.jira/.config.yml,
|
|
36
|
+
# and a --config path that does not exist fails closed with "Missing
|
|
37
|
+
# configuration file." rather than silently using the default.
|
|
38
|
+
jira --config .lisa/jira-cli/.config.yml issue view <TICKET_ID>
|
|
29
39
|
```
|
|
30
40
|
|
|
41
|
+
If `.lisa/jira-cli/.config.yml` does not exist, drop `--config` to fall back to
|
|
42
|
+
the machine's own jira-cli config — but say so in your report rather than
|
|
43
|
+
letting the Lisa-written config go quietly unused.
|
|
44
|
+
|
|
31
45
|
Extract:
|
|
32
46
|
- Title and description (what the feature/fix is)
|
|
33
47
|
- Acceptance criteria (what needs to be verified)
|
|
@@ -18,7 +18,10 @@ Upload captured screenshots and generated templates to GitHub PR description and
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
20
|
- `JIRA_API_TOKEN` environment variable set
|
|
21
|
-
-
|
|
21
|
+
- a jira-cli config — `.lisa/jira-cli/.config.yml` if the `setup-jira-cli`
|
|
22
|
+
SessionStart hook wrote one, otherwise `~/.config/.jira/.config.yml`. `server`
|
|
23
|
+
and `login` are read from whichever is used, and the fallback is announced on
|
|
24
|
+
stderr rather than taken silently.
|
|
22
25
|
- `gh` CLI authenticated
|
|
23
26
|
- Evidence directory containing:
|
|
24
27
|
- `NN-name-viewport.png` screenshots (numbered, e.g., `01-search-step-desktop.png`)
|
|
@@ -39,7 +42,7 @@ bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 4
|
|
|
39
42
|
|
|
40
43
|
## What It Does
|
|
41
44
|
|
|
42
|
-
1. **Read JIRA config** —
|
|
45
|
+
1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
|
|
43
46
|
2. **Upload to GitHub `pr-assets` release** — Uploads `NN-name-viewport.png` screenshots via `gh release upload --clobber`, creating CDN URLs that render in GitHub markdown
|
|
44
47
|
3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body using `gh pr edit`
|
|
45
48
|
4. **Upload JIRA attachments** — Uploads screenshots via REST API v3 so `!filename.png!` wiki markup renders inline
|
|
@@ -75,4 +78,4 @@ The screenshot must be uploaded as a JIRA attachment before posting the comment.
|
|
|
75
78
|
|
|
76
79
|
### JIRA API returns 403 on attachment upload
|
|
77
80
|
|
|
78
|
-
Ensure `JIRA_API_TOKEN` is set and `login` in `~/.config/.jira/.config.yml` matches your Atlassian account email.
|
|
81
|
+
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.
|