@codyswann/lisa 5.14.0 → 5.14.2
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/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +7 -140
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- 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-evidence/SKILL.md +10 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- package/plugins/lisa/rules/eager/coding-philosophy.md +1 -0
- package/plugins/lisa/rules/reference/coding-philosophy.md +20 -0
- package/plugins/lisa/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/lisa/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/lisa-agy/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa-agy/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- 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-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/eager/coding-philosophy.md +1 -0
- package/plugins/lisa-copilot/rules/reference/coding-philosophy.md +20 -0
- package/plugins/lisa-copilot/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/lisa-copilot/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa-copilot/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/coding-philosophy-reference.mdc +20 -0
- package/plugins/lisa-cursor/rules/coding-philosophy.mdc +1 -0
- package/plugins/lisa-cursor/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/lisa-cursor/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa-cursor/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/eager/coding-philosophy.md +1 -0
- package/plugins/lisa-devin/rules/reference/coding-philosophy.md +20 -0
- package/plugins/lisa-devin/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/lisa-devin/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/lisa-devin/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- 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/journey-guidance/SKILL.md +8 -3
- package/plugins/lisa-expo/skills/journey-guidance/SKILL.md +8 -3
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/journey-guidance/SKILL.md +8 -3
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/journey-guidance/SKILL.md +8 -3
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/journey-guidance/SKILL.md +8 -3
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/skills/journey-guidance/SKILL.md +8 -3
- 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-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-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-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-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-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-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/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-rails/skills/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-agy/skills/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/skills/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/skills/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/skills/journey-guidance/SKILL.md +3 -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-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-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/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/eager/coding-philosophy.md +1 -0
- package/plugins/src/base/rules/reference/coding-philosophy.md +20 -0
- package/plugins/src/base/skills/lisa-jira-evidence/SKILL.md +10 -4
- package/plugins/src/base/skills/lisa-jira-journey/SKILL.md +2 -2
- package/plugins/src/base/skills/lisa-jira-journey/scripts/generate-templates.py +70 -9
- package/plugins/src/expo/skills/journey-guidance/SKILL.md +8 -3
- package/plugins/src/rails/skills/journey-guidance/SKILL.md +3 -1
- package/plugins/lisa-expo/.codex-plugin/skills/jira-add-journey/SKILL.md +0 -142
- package/plugins/lisa-expo/.codex-plugin/skills/jira-add-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/.codex-plugin/skills/jira-create/SKILL.md +0 -163
- package/plugins/lisa-expo/.codex-plugin/skills/jira-create/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/SKILL.md +0 -112
- package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/SKILL.md +0 -209
- package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo/.codex-plugin/skills/jira-verify/SKILL.md +0 -29
- package/plugins/lisa-expo/.codex-plugin/skills/jira-verify/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/lisa-expo/skills/jira-add-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/skills/jira-create/SKILL.md +0 -161
- package/plugins/lisa-expo/skills/jira-create/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/lisa-expo/skills/jira-evidence/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo/skills/jira-journey/SKILL.md +0 -207
- package/plugins/lisa-expo/skills/jira-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-expo/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo/skills/jira-verify/SKILL.md +0 -27
- package/plugins/lisa-expo/skills/jira-verify/agents/openai.yaml +0 -4
- package/plugins/lisa-expo-agy/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/lisa-expo-agy/skills/jira-create/SKILL.md +0 -161
- package/plugins/lisa-expo-agy/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/lisa-expo-agy/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo-agy/skills/jira-journey/SKILL.md +0 -207
- package/plugins/lisa-expo-agy/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo-agy/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo-agy/skills/jira-verify/SKILL.md +0 -27
- package/plugins/lisa-expo-copilot/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/lisa-expo-copilot/skills/jira-create/SKILL.md +0 -161
- package/plugins/lisa-expo-copilot/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/lisa-expo-copilot/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo-copilot/skills/jira-journey/SKILL.md +0 -207
- package/plugins/lisa-expo-copilot/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo-copilot/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo-copilot/skills/jira-verify/SKILL.md +0 -27
- package/plugins/lisa-expo-cursor/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/lisa-expo-cursor/skills/jira-create/SKILL.md +0 -161
- package/plugins/lisa-expo-cursor/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/lisa-expo-cursor/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo-cursor/skills/jira-journey/SKILL.md +0 -207
- package/plugins/lisa-expo-cursor/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo-cursor/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo-cursor/skills/jira-verify/SKILL.md +0 -27
- package/plugins/lisa-expo-devin/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/lisa-expo-devin/skills/jira-create/SKILL.md +0 -161
- package/plugins/lisa-expo-devin/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/lisa-expo-devin/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-expo-devin/skills/jira-journey/SKILL.md +0 -207
- package/plugins/lisa-expo-devin/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/lisa-expo-devin/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/lisa-expo-devin/skills/jira-verify/SKILL.md +0 -27
- package/plugins/lisa-rails/.codex-plugin/skills/jira-add-journey/SKILL.md +0 -81
- package/plugins/lisa-rails/.codex-plugin/skills/jira-add-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/.codex-plugin/skills/jira-create/SKILL.md +0 -102
- package/plugins/lisa-rails/.codex-plugin/skills/jira-create/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/SKILL.md +0 -103
- package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails/.codex-plugin/skills/jira-journey/SKILL.md +0 -67
- package/plugins/lisa-rails/.codex-plugin/skills/jira-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/.codex-plugin/skills/jira-verify/SKILL.md +0 -28
- package/plugins/lisa-rails/.codex-plugin/skills/jira-verify/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/lisa-rails/skills/jira-add-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/skills/jira-create/SKILL.md +0 -100
- package/plugins/lisa-rails/skills/jira-create/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/lisa-rails/skills/jira-evidence/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails/skills/jira-journey/SKILL.md +0 -65
- package/plugins/lisa-rails/skills/jira-journey/agents/openai.yaml +0 -4
- package/plugins/lisa-rails/skills/jira-verify/SKILL.md +0 -26
- package/plugins/lisa-rails/skills/jira-verify/agents/openai.yaml +0 -4
- package/plugins/lisa-rails-agy/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/lisa-rails-agy/skills/jira-create/SKILL.md +0 -100
- package/plugins/lisa-rails-agy/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/lisa-rails-agy/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails-agy/skills/jira-journey/SKILL.md +0 -65
- package/plugins/lisa-rails-agy/skills/jira-verify/SKILL.md +0 -26
- package/plugins/lisa-rails-copilot/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/lisa-rails-copilot/skills/jira-create/SKILL.md +0 -100
- package/plugins/lisa-rails-copilot/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/lisa-rails-copilot/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails-copilot/skills/jira-journey/SKILL.md +0 -65
- package/plugins/lisa-rails-copilot/skills/jira-verify/SKILL.md +0 -26
- package/plugins/lisa-rails-cursor/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/lisa-rails-cursor/skills/jira-create/SKILL.md +0 -100
- package/plugins/lisa-rails-cursor/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/lisa-rails-cursor/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails-cursor/skills/jira-journey/SKILL.md +0 -65
- package/plugins/lisa-rails-cursor/skills/jira-verify/SKILL.md +0 -26
- package/plugins/lisa-rails-devin/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/lisa-rails-devin/skills/jira-create/SKILL.md +0 -100
- package/plugins/lisa-rails-devin/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/lisa-rails-devin/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/lisa-rails-devin/skills/jira-journey/SKILL.md +0 -65
- package/plugins/lisa-rails-devin/skills/jira-verify/SKILL.md +0 -26
- package/plugins/src/expo/skills/jira-add-journey/SKILL.md +0 -140
- package/plugins/src/expo/skills/jira-create/SKILL.md +0 -161
- package/plugins/src/expo/skills/jira-evidence/SKILL.md +0 -110
- package/plugins/src/expo/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/src/expo/skills/jira-journey/SKILL.md +0 -207
- package/plugins/src/expo/skills/jira-journey/scripts/generate-templates.py +0 -323
- package/plugins/src/expo/skills/jira-journey/scripts/parse-plan.py +0 -400
- package/plugins/src/expo/skills/jira-verify/SKILL.md +0 -27
- package/plugins/src/rails/skills/jira-add-journey/SKILL.md +0 -79
- package/plugins/src/rails/skills/jira-create/SKILL.md +0 -100
- package/plugins/src/rails/skills/jira-evidence/SKILL.md +0 -101
- package/plugins/src/rails/skills/jira-evidence/scripts/post-evidence.sh +0 -397
- package/plugins/src/rails/skills/jira-journey/SKILL.md +0 -65
- package/plugins/src/rails/skills/jira-verify/SKILL.md +0 -26
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Generate evidence comment templates from captured screenshots.
|
|
3
|
-
|
|
4
|
-
Scans an evidence directory for screenshots, reads the journey JSON,
|
|
5
|
-
and produces comment.txt (JIRA wiki markup) and comment.md (GitHub markdown).
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python3 generate-templates.py <TICKET_ID> <PR_NUMBER> <BRANCH_NAME> <EVIDENCE_DIR> [JOURNEY_JSON]
|
|
9
|
-
|
|
10
|
-
Example:
|
|
11
|
-
python3 generate-templates.py SE-3820 1299 fix/SE-3820-mobile ./evidence journey.json
|
|
12
|
-
|
|
13
|
-
If JOURNEY_JSON is not provided, reads from stdin.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
import json
|
|
17
|
-
import os
|
|
18
|
-
import re
|
|
19
|
-
import subprocess
|
|
20
|
-
import sys
|
|
21
|
-
from pathlib import Path
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def evidence_release():
|
|
25
|
-
"""The GitHub release evidence is uploaded to, matching post-evidence.sh.
|
|
26
|
-
|
|
27
|
-
LISA_EVIDENCE_RELEASE wins when set. Otherwise ask the project's
|
|
28
|
-
`scripts/lisa-work-item.mjs evidence-release --ensure`, exactly as
|
|
29
|
-
post-evidence.sh does, so a configured rotation such as
|
|
30
|
-
`pr-assets-{YYYY-MM}` reaches these links too (CodySwannGT/lisa#4692) and
|
|
31
|
-
both name the same overflow release when the current one is full
|
|
32
|
-
(CodySwannGT/lisa#4838); plain `evidence-release` would name the full
|
|
33
|
-
release and every link would 404. `--ensure` creates the release when it
|
|
34
|
-
is absent and fails only when a pinned release is full, every overflow
|
|
35
|
-
release is full, the release name is too long to take an overflow suffix,
|
|
36
|
-
or the release cannot be created. A host without the resolver keeps the legacy `pr-assets` release.
|
|
37
|
-
"""
|
|
38
|
-
configured = os.environ.get("LISA_EVIDENCE_RELEASE", "").strip()
|
|
39
|
-
if configured:
|
|
40
|
-
return configured
|
|
41
|
-
try:
|
|
42
|
-
root = subprocess.run(
|
|
43
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
44
|
-
capture_output=True, text=True, check=True,
|
|
45
|
-
).stdout.strip()
|
|
46
|
-
except (OSError, subprocess.CalledProcessError):
|
|
47
|
-
root = os.getcwd()
|
|
48
|
-
cli = Path(root) / "scripts" / "lisa-work-item.mjs"
|
|
49
|
-
if cli.is_file():
|
|
50
|
-
result = subprocess.run(
|
|
51
|
-
["node", str(cli), "evidence-release", "--ensure"],
|
|
52
|
-
capture_output=True, text=True, cwd=root,
|
|
53
|
-
)
|
|
54
|
-
if result.returncode != 0:
|
|
55
|
-
sys.exit(f"ERROR: could not resolve the evidence release: {result.stderr.strip()}")
|
|
56
|
-
return result.stdout.strip()
|
|
57
|
-
return "pr-assets"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def get_jira_server():
|
|
61
|
-
"""Read JIRA server URL from jira-cli config."""
|
|
62
|
-
config_path = Path.home() / ".config" / ".jira" / ".config.yml"
|
|
63
|
-
if not config_path.exists():
|
|
64
|
-
print(f"ERROR: jira-cli config not found at {config_path}", file=sys.stderr)
|
|
65
|
-
sys.exit(1)
|
|
66
|
-
|
|
67
|
-
server = ""
|
|
68
|
-
with open(config_path) as f:
|
|
69
|
-
for line in f:
|
|
70
|
-
if line.startswith("server:"):
|
|
71
|
-
server = line.split(":", 1)[1].strip()
|
|
72
|
-
break
|
|
73
|
-
|
|
74
|
-
if not server:
|
|
75
|
-
print("ERROR: Could not read server from jira-cli config", file=sys.stderr)
|
|
76
|
-
sys.exit(1)
|
|
77
|
-
|
|
78
|
-
return server
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def get_github_repo():
|
|
82
|
-
"""Detect GitHub repo from gh CLI."""
|
|
83
|
-
try:
|
|
84
|
-
result = subprocess.run(
|
|
85
|
-
["gh", "repo", "view", "--json", "nameWithOwner", "--jq", ".nameWithOwner"],
|
|
86
|
-
capture_output=True, text=True, timeout=10,
|
|
87
|
-
)
|
|
88
|
-
return result.stdout.strip()
|
|
89
|
-
except (subprocess.SubprocessError, FileNotFoundError):
|
|
90
|
-
return ""
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def collect_screenshots(evidence_dir):
|
|
94
|
-
"""Collect screenshot files sorted by name.
|
|
95
|
-
|
|
96
|
-
Only NN-*.png: that is exactly what post-evidence.sh uploads and
|
|
97
|
-
attaches, and it refuses a description that links anything it did not
|
|
98
|
-
upload (CodySwannGT/lisa#4639). Linking a .jpg/.gif here would fail it.
|
|
99
|
-
"""
|
|
100
|
-
evidence_path = Path(evidence_dir)
|
|
101
|
-
screenshots = list(evidence_path.glob("[0-9][0-9]-*.png"))
|
|
102
|
-
return sorted(screenshots, key=lambda p: p.name)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def group_by_viewport(screenshots):
|
|
106
|
-
"""Group screenshots by viewport suffix.
|
|
107
|
-
|
|
108
|
-
Expects filenames like: 01-search-step-desktop.png
|
|
109
|
-
The last segment before .ext is the viewport name.
|
|
110
|
-
"""
|
|
111
|
-
groups = {}
|
|
112
|
-
for path in screenshots:
|
|
113
|
-
stem = path.stem # e.g., "01-search-step-desktop"
|
|
114
|
-
parts = stem.rsplit("-", 1)
|
|
115
|
-
if len(parts) == 2:
|
|
116
|
-
viewport = parts[1]
|
|
117
|
-
else:
|
|
118
|
-
viewport = "unknown"
|
|
119
|
-
|
|
120
|
-
if viewport not in groups:
|
|
121
|
-
groups[viewport] = []
|
|
122
|
-
groups[viewport].append(path)
|
|
123
|
-
|
|
124
|
-
return groups
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
def generate_jira_wiki(ticket_id, pr_number, branch, screenshots, journey, gh_repo):
|
|
128
|
-
"""Generate JIRA wiki markup comment."""
|
|
129
|
-
lines = []
|
|
130
|
-
lines.append(f"h2. Evidence — PR #{pr_number}")
|
|
131
|
-
lines.append("")
|
|
132
|
-
lines.append(f"*Branch:* {{{{{branch}}}}}")
|
|
133
|
-
lines.append(f"*PR:* [PR #{pr_number}|https://github.com/{gh_repo}/pull/{pr_number}]")
|
|
134
|
-
lines.append("")
|
|
135
|
-
|
|
136
|
-
# Verification Results from assertions
|
|
137
|
-
if journey.get("assertions"):
|
|
138
|
-
lines.append("h3. Verification Results")
|
|
139
|
-
lines.append("")
|
|
140
|
-
for assertion in journey["assertions"]:
|
|
141
|
-
lines.append(f"* {assertion}")
|
|
142
|
-
lines.append("")
|
|
143
|
-
|
|
144
|
-
# Visual Evidence grouped by viewport
|
|
145
|
-
lines.append("h3. Visual Evidence")
|
|
146
|
-
lines.append("")
|
|
147
|
-
|
|
148
|
-
viewport_groups = group_by_viewport(screenshots)
|
|
149
|
-
|
|
150
|
-
for viewport_info in journey.get("viewports", []):
|
|
151
|
-
vp_name = viewport_info["name"]
|
|
152
|
-
vp_key = vp_name.lower()
|
|
153
|
-
vp_width = viewport_info["width"]
|
|
154
|
-
vp_height = viewport_info["height"]
|
|
155
|
-
|
|
156
|
-
vp_screenshots = viewport_groups.get(vp_key, [])
|
|
157
|
-
if not vp_screenshots:
|
|
158
|
-
continue
|
|
159
|
-
|
|
160
|
-
# Use viewport width for JIRA image display, capped at 700
|
|
161
|
-
display_width = min(vp_width, 700)
|
|
162
|
-
|
|
163
|
-
lines.append(f"h4. {vp_name} ({vp_width}x{vp_height})")
|
|
164
|
-
lines.append("")
|
|
165
|
-
|
|
166
|
-
for img_path in vp_screenshots:
|
|
167
|
-
filename = img_path.name
|
|
168
|
-
# Extract readable label from filename
|
|
169
|
-
stem = img_path.stem
|
|
170
|
-
# Remove NN- prefix and -viewport suffix
|
|
171
|
-
label_parts = stem.split("-")[1:-1]
|
|
172
|
-
label = " ".join(label_parts).title() if label_parts else stem
|
|
173
|
-
|
|
174
|
-
lines.append(f"*{label}:*")
|
|
175
|
-
lines.append(f"!{filename}|width={display_width}!")
|
|
176
|
-
lines.append("")
|
|
177
|
-
|
|
178
|
-
# Verification Journey steps
|
|
179
|
-
if journey.get("steps"):
|
|
180
|
-
lines.append("h3. Verification Journey")
|
|
181
|
-
lines.append("")
|
|
182
|
-
for step in journey["steps"]:
|
|
183
|
-
text = step["text"]
|
|
184
|
-
# Remove [SCREENSHOT: ...] and [EVIDENCE: ...] markers from display text
|
|
185
|
-
clean_text = re.sub(r'\s*\[(SCREENSHOT|EVIDENCE):\s*[^\]]+\]', '', text).strip()
|
|
186
|
-
lines.append(f"# {clean_text}")
|
|
187
|
-
lines.append("")
|
|
188
|
-
|
|
189
|
-
# Viewports table
|
|
190
|
-
if journey.get("viewports"):
|
|
191
|
-
lines.append("h3. Key Viewports")
|
|
192
|
-
lines.append("")
|
|
193
|
-
lines.append("||Viewport||Resolution||")
|
|
194
|
-
for vp in journey["viewports"]:
|
|
195
|
-
lines.append(f"|{vp['name']}|{vp['width']}x{vp['height']}|")
|
|
196
|
-
lines.append("")
|
|
197
|
-
|
|
198
|
-
return "\n".join(lines)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
def generate_github_md(ticket_id, pr_number, branch, screenshots, journey, gh_repo):
|
|
202
|
-
"""Generate GitHub markdown comment."""
|
|
203
|
-
jira_server = get_jira_server()
|
|
204
|
-
release_base = f"https://github.com/{gh_repo}/releases/download/{evidence_release()}"
|
|
205
|
-
|
|
206
|
-
lines = []
|
|
207
|
-
lines.append(f"## Evidence — PR #{pr_number}")
|
|
208
|
-
lines.append("")
|
|
209
|
-
lines.append(f"**Branch:** `{branch}`")
|
|
210
|
-
lines.append(f"**Ticket:** [{ticket_id}]({jira_server}/browse/{ticket_id})")
|
|
211
|
-
lines.append("")
|
|
212
|
-
|
|
213
|
-
# Verification Results
|
|
214
|
-
if journey.get("assertions"):
|
|
215
|
-
lines.append("### Verification Results")
|
|
216
|
-
lines.append("")
|
|
217
|
-
for assertion in journey["assertions"]:
|
|
218
|
-
lines.append(f"- {assertion}")
|
|
219
|
-
lines.append("")
|
|
220
|
-
|
|
221
|
-
# Visual Evidence grouped by viewport
|
|
222
|
-
lines.append("### Visual Evidence")
|
|
223
|
-
lines.append("")
|
|
224
|
-
|
|
225
|
-
viewport_groups = group_by_viewport(screenshots)
|
|
226
|
-
|
|
227
|
-
for viewport_info in journey.get("viewports", []):
|
|
228
|
-
vp_name = viewport_info["name"]
|
|
229
|
-
vp_key = vp_name.lower()
|
|
230
|
-
vp_width = viewport_info["width"]
|
|
231
|
-
vp_height = viewport_info["height"]
|
|
232
|
-
|
|
233
|
-
vp_screenshots = viewport_groups.get(vp_key, [])
|
|
234
|
-
if not vp_screenshots:
|
|
235
|
-
continue
|
|
236
|
-
|
|
237
|
-
lines.append(f"#### {vp_name} ({vp_width}x{vp_height})")
|
|
238
|
-
lines.append("")
|
|
239
|
-
|
|
240
|
-
for img_path in vp_screenshots:
|
|
241
|
-
filename = img_path.name
|
|
242
|
-
stem = img_path.stem
|
|
243
|
-
label_parts = stem.split("-")[1:-1]
|
|
244
|
-
label = " ".join(label_parts).title() if label_parts else stem
|
|
245
|
-
|
|
246
|
-
lines.append(f"**{label}:**")
|
|
247
|
-
lines.append("")
|
|
248
|
-
# post-evidence.sh stores the asset as pr-<number>-<file> so pull
|
|
249
|
-
# requests sharing the release never overwrite each other's
|
|
250
|
-
# evidence (CodySwannGT/lisa#4639); link exactly that name.
|
|
251
|
-
lines.append(f"")
|
|
252
|
-
lines.append("")
|
|
253
|
-
|
|
254
|
-
# Verification Journey
|
|
255
|
-
if journey.get("steps"):
|
|
256
|
-
lines.append("### Verification Journey")
|
|
257
|
-
lines.append("")
|
|
258
|
-
for step in journey["steps"]:
|
|
259
|
-
text = step["text"]
|
|
260
|
-
clean_text = re.sub(r'\s*\[(SCREENSHOT|EVIDENCE):\s*[^\]]+\]', '', text).strip()
|
|
261
|
-
lines.append(f"{step['number']}. {clean_text}")
|
|
262
|
-
lines.append("")
|
|
263
|
-
|
|
264
|
-
# Viewports table
|
|
265
|
-
if journey.get("viewports"):
|
|
266
|
-
lines.append("### Key Viewports")
|
|
267
|
-
lines.append("")
|
|
268
|
-
lines.append("| Viewport | Resolution |")
|
|
269
|
-
lines.append("|----------|-----------|")
|
|
270
|
-
for vp in journey["viewports"]:
|
|
271
|
-
lines.append(f"| {vp['name']} | {vp['width']}x{vp['height']} |")
|
|
272
|
-
lines.append("")
|
|
273
|
-
|
|
274
|
-
return "\n".join(lines)
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
def main():
|
|
278
|
-
if len(sys.argv) < 5:
|
|
279
|
-
print(
|
|
280
|
-
"Usage: generate-templates.py <TICKET_ID> <PR_NUMBER> <BRANCH_NAME> <EVIDENCE_DIR> [JOURNEY_JSON]",
|
|
281
|
-
file=sys.stderr,
|
|
282
|
-
)
|
|
283
|
-
sys.exit(1)
|
|
284
|
-
|
|
285
|
-
ticket_id = sys.argv[1]
|
|
286
|
-
pr_number = sys.argv[2]
|
|
287
|
-
branch = sys.argv[3]
|
|
288
|
-
evidence_dir = sys.argv[4]
|
|
289
|
-
journey_file = sys.argv[5] if len(sys.argv) > 5 else None
|
|
290
|
-
|
|
291
|
-
# Read journey JSON
|
|
292
|
-
if journey_file:
|
|
293
|
-
with open(journey_file) as f:
|
|
294
|
-
journey = json.load(f)
|
|
295
|
-
else:
|
|
296
|
-
journey = json.load(sys.stdin)
|
|
297
|
-
|
|
298
|
-
gh_repo = get_github_repo()
|
|
299
|
-
if not gh_repo:
|
|
300
|
-
print("ERROR: Could not detect GitHub repo — ensure gh CLI is authenticated", file=sys.stderr)
|
|
301
|
-
sys.exit(1)
|
|
302
|
-
|
|
303
|
-
screenshots = collect_screenshots(evidence_dir)
|
|
304
|
-
if not screenshots:
|
|
305
|
-
print(f"ERROR: No screenshots found in {evidence_dir}", file=sys.stderr)
|
|
306
|
-
sys.exit(1)
|
|
307
|
-
|
|
308
|
-
# Generate templates
|
|
309
|
-
jira_wiki = generate_jira_wiki(ticket_id, pr_number, branch, screenshots, journey, gh_repo)
|
|
310
|
-
github_md = generate_github_md(ticket_id, pr_number, branch, screenshots, journey, gh_repo)
|
|
311
|
-
|
|
312
|
-
# Write templates
|
|
313
|
-
evidence_path = Path(evidence_dir)
|
|
314
|
-
(evidence_path / "comment.txt").write_text(jira_wiki)
|
|
315
|
-
(evidence_path / "comment.md").write_text(github_md)
|
|
316
|
-
|
|
317
|
-
print(f"Generated {evidence_path / 'comment.txt'} ({len(jira_wiki)} bytes)")
|
|
318
|
-
print(f"Generated {evidence_path / 'comment.md'} ({len(github_md)} bytes)")
|
|
319
|
-
print(f"Screenshots: {len(screenshots)}")
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if __name__ == "__main__":
|
|
323
|
-
main()
|