fix(jtk): align automation API parsing with Jira Cloud#87
fix(jtk): align automation API parsing with Jira Cloud#87rianjs merged 2 commits intoopen-cli-collective:mainfrom
Conversation
TDD Assessment for PR #87SummaryThis PR adapts the automation API layer and CLI commands to handle Jira Cloud's actual response shapes, which differ from the documented types. The changes span 8 files: 3 in the What the PR changes
Coverage verdict: Adequate at the API layer, but has gaps worth closingThe API-layer tests are well-structured and were updated alongside the code. The command-layer tests are thinner. Here is the breakdown: Well-covered (no action needed)
Gaps that should be addressed1. These methods encode a priority chain ( Suggested tests:
2. The new try-envelope-then-fallback logic in Suggested tests:
3.
Suggested test:
4. These three commands were modified in this PR (ID -> UUID in output formatting) but have zero test coverage. The Bottom lineThe most consequential new logic in this PR -- the I would recommend adding:
These additions are small (probably ~60-80 lines total) and would close the meaningful coverage gaps without being dogmatic about hitting arbitrary coverage percentages. |
…normalization Cover the gaps in PR open-cli-collective#87: - Identifier() priority chain on both AutomationRule and AutomationRuleSummary - Items() fallback from Data to Values for legacy list responses - NextURL() fallback from Links.Next to top-level Next - GetAutomationRule legacy shape (no envelope) parsing - RuleKey→UUID normalization in both envelope and legacy paths - End-to-end ListAutomationRules with legacy response shape
Handle Cloud automation list/get response shapes (data/links envelope + uuid identifiers) and update CLI output to use UUIDs.
…normalization Cover the gaps in PR open-cli-collective#87: - Identifier() priority chain on both AutomationRule and AutomationRuleSummary - Items() fallback from Data to Values for legacy list responses - NextURL() fallback from Links.Next to top-level Next - GetAutomationRule legacy shape (no envelope) parsing - RuleKey→UUID normalization in both envelope and legacy paths - End-to-end ListAutomationRules with legacy response shape
d5bd89b to
18d0157
Compare
|
@lunareed720 - fix is available via homebrew now - |
Fixes #81
Automation API responses in Jira Cloud differ from the documented types (e.g. list uses {links,data} and rules are identified by uuid).
Changes: