Skip to content

Commit 776ae81

Browse files
author
Genevieve Nuebel
committed
Add Changed subtitle to new entries
1 parent a932caa commit 776ae81

5 files changed

Lines changed: 45 additions & 10 deletions

File tree

.github/changelog_manager.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def build_entry(api_version, version_number, date)
109109

110110
<<~ENTRY
111111
## [#{version_number}] - #{date_str} (#{api_version} API)
112-
#{message}
112+
113+
### Changed
114+
- #{message}
113115
ENTRY
114116
end
115117

.github/spec/changelog_manager_spec.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def read_changelog
5959

6060
updated_content = read_changelog
6161
expect(updated_content).to include('## [3.0.0] - 2026-01-28 (v20250224 API)')
62+
expect(updated_content).to include('### Changed')
6263
expect(updated_content).to include('Updated v20250224 API specification to most current version')
6364
expect(updated_content).to include('[API changelog]')
6465

@@ -86,6 +87,7 @@ def read_changelog
8687
expect(updated_content).to include('## [2.0.0] - 2026-01-28 (v20111101 API)')
8788
expect(updated_content).to include('Updated v20250224 API specification to most current version')
8889
expect(updated_content).to include('Updated v20111101 API specification to most current version')
90+
expect(updated_content).to include('### Changed')
8991

9092
# v20250224 should come BEFORE v20111101 (sorting)
9193
v20250224_pos = updated_content.index('[3.0.0]')
@@ -103,6 +105,7 @@ def read_changelog
103105
expect(result).to be true
104106
updated_content = read_changelog
105107
expect(updated_content).to include('## [3.0.0] - 2026-01-28 (v20250224 API)')
108+
expect(updated_content).to include('### Changed')
106109
end
107110
end
108111

@@ -123,6 +126,21 @@ def read_changelog
123126
v20111101_pos = updated_content.index('[2.0.0]')
124127
expect(v20250224_pos).to be < v20111101_pos
125128
end
129+
130+
it 'includes changed section for each entry' do
131+
setup_changelog
132+
setup_version_directory('v20250224', v20250224_package_fixture)
133+
setup_version_directory('v20111101', v20111101_package_fixture)
134+
135+
result = ChangelogManager.update('v20250224,v20111101')
136+
137+
expect(result).to be true
138+
updated_content = read_changelog
139+
140+
# Count occurrences of ### Changed - should be 2 for the new entries
141+
changed_count = updated_content.scan(/### Changed/).length
142+
expect(changed_count).to be >= 2 # At least 2 from the new entries
143+
end
126144
end
127145

128146
describe '.update with date range behavior' do
@@ -150,6 +168,8 @@ def read_changelog
150168
expect(updated_content).to include('Updated v20250224 API specification to most current version. Please check full [API changelog]')
151169
# Should NOT have a "between" clause
152170
expect(updated_content).not_to match(/between \d{4}-\d{2}-\d{2} and \d{4}-\d{2}-\d{2}.*v20250224/)
171+
# Should include Changed section
172+
expect(updated_content).to include('### Changed')
153173
end
154174

155175
it 'uses correct dates in range for multiple version updates' do
@@ -168,6 +188,8 @@ def read_changelog
168188
# v20250224 should NOT have date range (no prior entry)
169189
v20250224_section = updated_content[/## \[3\.0\.0\].*?(?=##|\z)/m]
170190
expect(v20250224_section).not_to match(/between.*v20250224/)
191+
# Both should have Changed section
192+
expect(updated_content).to include('### Changed')
171193
end
172194
end
173195

@@ -239,6 +261,7 @@ def read_changelog
239261
# Verify changelog was updated
240262
updated_content = read_changelog
241263
expect(updated_content).to include('## [3.0.0] - 2026-01-28 (v20250224 API)')
264+
expect(updated_content).to include('### Changed')
242265
end
243266

244267
it 'exits with error when versions argument is nil' do

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.0.0] - 2026-01-07
8+
## [2.0.0] - 2026-01-07 (v20111101 API)
99

1010
### Changed
1111
- **Versioning Correction:** Re-released as v2.0.0 to properly indicate breaking changes that were inadvertently introduced in v1.10.1
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
### Changed
2424
- Restructured API classes from single `MxPlatformApi` to domain-specific classes
2525

26-
## [1.12.1] - 2025-11-25
26+
## [1.12.1] - 2025-11-25 (v20111101 API)
2727

2828
### Fixed
2929
- Updated package template (`package.mustache`) to fix recurring dependency regression
@@ -42,7 +42,7 @@ These versions (v1.10.1 through v1.12.0) contain the breaking API restructure bu
4242

4343
**If you are on any of these versions:** Please upgrade to v2.0.0.
4444

45-
## [1.10.0] - 2025-11-05
45+
## [1.10.0] - 2025-11-05 (v20111101 API)
4646

4747
### Note
4848
- Last stable version with unified `MxPlatformApi` class

docs/Changelog-Manager.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,32 @@ The entries are inserted in version order (v20250224 first, v20111101 second), e
5555
Result:
5656
```markdown
5757
## [3.2.0] - 2025-01-28 (v20250224 API)
58-
Updated v20250224 API specification to most current version...
58+
59+
### Changed
60+
- Updated v20250224 API specification to most current version...
5961

6062
## [2.5.3] - 2025-01-28 (v20111101 API)
61-
Updated v20111101 API specification to most current version...
63+
64+
### Changed
65+
- Updated v20111101 API specification to most current version...
6266
```
6367

6468
### Example Output
6569

6670
With a prior entry:
6771
```markdown
6872
## [3.2.0] - 2025-01-28 (v20250224 API)
69-
Updated v20250224 API specification to most current version. Please check full [API changelog](https://docs.mx.com/resources/changelog/platform) for any changes made between 2025-01-15 and 2025-01-28.
73+
74+
### Changed
75+
- Updated v20250224 API specification to most current version. Please check full [API changelog](https://docs.mx.com/resources/changelog/platform) for any changes made between 2025-01-15 and 2025-01-28.
7076
```
7177

7278
Without a prior entry:
7379
```markdown
7480
## [3.2.0] - 2025-01-28 (v20250224 API)
75-
Updated v20250224 API specification to most current version. Please check full [API changelog](https://docs.mx.com/resources/changelog/platform) for any changes.
81+
82+
### Changed
83+
- Updated v20250224 API specification to most current version. Please check full [API changelog](https://docs.mx.com/resources/changelog/platform) for any changes.
7684
```
7785

7886
## Location

docs/Workflow-and-Configuration-Reference.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ strategy:
106106
# Changelog
107107
108108
## [3.0.1] - 2026-01-27 (v20250224 API)
109-
Updated v20250224 API specification...
109+
### Changed
110+
- Updated v20250224 API specification...
110111
111112
## [2.0.1] - 2026-01-27 (v20111101 API)
112-
Updated v20111101 API specification...
113+
### Changed
114+
- Updated v20111101 API specification...
113115
```
114116
115117
4. **Copy Documentation to Version Directories**

0 commit comments

Comments
 (0)