Add ChangeMinder change number to all output formats #297
Conversation
Add specification for F281658 - ensuring all ALKS CLI output formats include changeNumber when ChangeMinder flags are provided. Currently six formats (creds, docker, terraformarg, terraformenv, aws, idea) silently discard the change ticket number. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add 7-step implementation plan for F281658: - Phase 1: Prove creds format pattern (getKeyOutput + updateCreds) - Phase 2: Extend to 5 remaining formats (docker, terraform*, aws, idea) Test approach: TDD with Jest. Phase 2 steps can execute in parallel. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Decompose 7 STEPs into 7 individually-executable tasks: - Bundle 1 (Sequential): Prove creds format pattern (TASK-1, TASK-2) - Bundle 2 (Parallel): Extend to 5 remaining formats (TASK-3-7) Each task follows TDD approach with detailed sub-steps (max 5). Switch case isolation enables safe parallel execution for Bundle 2. Total effort: 2 Medium + 5 Small tasks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…g [TASK-1] Add comprehensive test suite for getKeyOutput with focus on creds format: - Verify key with changeNumber is passed to updateCreds (AC-1.1) - Verify backward compatibility when changeNumber is undefined (AC-1.2) - Add coverage for json format changeNumber handling Tests confirm existing implementation correctly passes changeNumber through to updateCreds for file writing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ASK-2] Implement changeNumber persistence in creds output format by writing it as an INI comment above the profile section. Comment format: # ALKS_CHANGE_NUMBER=<value> - Modified updateCreds() to accept Key type instead of AwsKey - Added logic to insert changeNumber comment before profile section - Comprehensive test coverage for all scenarios (defined, undefined, named profile) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement changeNumber in docker output format by appending -e ALKS_CHANGE_NUMBER when changeNumber is defined. - Added docker format tests for changeNumber presence and absence - Modified docker case to conditionally append changeNumber environment variable - Follows existing -e flag pattern for environment variables Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement changeNumber in terraformarg output format using -var syntax for Terraform CLI arguments. - Added terraformarg format tests for changeNumber presence and absence - Modified terraformarg case to append -var alks_change_number when defined - Uses snake_case naming to match Terraform variable conventions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement changeNumber in terraformenv output format using export/SET syntax for shell environment variables. - Added terraformenv format tests for changeNumber presence and absence - Modified terraformenv case to append platform-specific changeNumber export - Uses CONSTANT_CASE naming to match shell environment variable conventions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement changeNumber in aws output format for credential process JSON. - Added aws format tests for changeNumber presence and absence - Modified aws case to conditionally include ChangeNumber in JSON output - Uses PascalCase naming to match AWS credential process schema conventions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… formats Align with existing convention used in powershell, fishshell, linux, and export formats which use CHANGE_NUMBER without ALKS or AWS prefix. Changes: - creds: # ALKS_CHANGE_NUMBER → # CHANGE_NUMBER - docker: -e ALKS_CHANGE_NUMBER → -e CHANGE_NUMBER - terraformarg: -var alks_change_number → -e CHANGE_NUMBER (also fixed to use -e for consistency) - terraformenv: export ALKS_CHANGE_NUMBER → export CHANGE_NUMBER - idea: ALKS_CHANGE_NUMBER → CHANGE_NUMBER - aws: ChangeNumber (unchanged - already follows PascalCase convention) This creates consistent naming across all output formats and matches the established pattern from existing formats that already supported changeNumber. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
codykoelemay
left a comment
There was a problem hiding this comment.
Maybe this is a just a question, maybe not.
The modified formats have a guard if there is no change number, but the unmodified formats don't.
I think we'd want the same functionality in all outputs? (if no change number is provided, don't include it in output)
- powershell (line 59-63): Always outputs CHANGE_NUMBER, using key.changeNumber ?? '' — sets the env var to empty string when undefined.
- fishshell (line 66): Always outputs CHANGE_NUMBER='${key.changeNumber}' — will literally output CHANGE_NUMBER='undefined' when the field is missing.
- linux (line 79): Same issue — outputs CHANGE_NUMBER='undefined'.
- export/set/default (line 90): Same issue — outputs CHANGE_NUMBER='undefined'.
… export formats Omit CHANGE_NUMBER from output when changeNumber is undefined, consistent with the guard pattern already applied to docker, terraformarg, tarraformenv, idea, and aws formats. Adds test coverage for all four formats. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
That's a great callout. As such, I've applied the same if (key.changeNumber) guard to powershell, fishshell, linux, and export/set/default. All four now omit CHANGE_NUMBER entirely when Quick note on powershell: the original multi-assignment syntax ($env:A, $env:B = "a","b") doesn't allow conditionally dropping a variable, so I switched to individual Lastly, I added test coverage for all four formats and updated the changelog (so it should pass CI/CD checks). Thanks for the second set of eyes! |
Summary
Implements changeNumber field from ChangeMinder across all six ALKS CLI output formats to support change ticket tracking.
Changes
Implementation Details
Testing
Commits
Rally Feature: F281658 - Add ChangeMinder change number to all ALKS CLI output formats
🤖 Generated with Claude Code