File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,13 +100,11 @@ Edit `app/build.gradle.kts`:
100100
101101``` bash
102102git add app/build.gradle.kts
103- # If changelog collection updated files:
104- git add CHANGELOG.md changelog.d
105103git commit -m " chore: version {newVersionName}"
106104git push -u origin release-{newVersionName}
107105```
108106
109- Only stage ` CHANGELOG.md ` and ` changelog.d ` if changelog collection updated ` CHANGELOG.md ` or deleted consumed fragments .
107+ If changelog collection updated ` CHANGELOG.md ` or deleted consumed fragments, run ` git add CHANGELOG.md changelog.d ` before the commit .
110108
111109### 4. Create Version Bump PR
112110
Original file line number Diff line number Diff line change @@ -153,14 +153,16 @@ for fragment in fragments:
153153changelog = CHANGELOG.read_text()
154154start, end = unreleased_bounds(changelog)
155155body = changelog[start:end]
156+ existing_entries = set(body.splitlines())
156157
157158inserted = 0
158159for category in CATEGORY_ORDER:
159- entries = [entry for entry in entries_by_category[category] if entry not in body ]
160+ entries = [entry for entry in entries_by_category[category] if entry not in existing_entries ]
160161 if not entries:
161162 continue
162163
163164 body = insert_entries(body, category, entries)
165+ existing_entries.update(entries)
164166 inserted += len(entries)
165167
166168CHANGELOG.write_text(changelog[:start] + body + changelog[end:])
You can’t perform that action at this time.
0 commit comments