-
Notifications
You must be signed in to change notification settings - Fork 6.6k
ci: dedup stuff in changelog #8522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
|
/oc no the problem was that commits were added twice because of a force push, see full changelog for reference: |
|
The fix looks correct. Let me verify the changes:
The iteration at lines 252-256 uses The fix is correct and complete. The PR properly addresses the issue where force pushes can cause the GitHub comparison API to return duplicate commits with different SHA hashes but identical messages. By using a LGTM - This is a clean, minimal fix that solves the problem without changing the output format or requiring any additional changes to the iteration logic. |
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>

The iteration code on lines 252-256 will work fine with a
Setsince bothArrayandSetare iterable withfor...of. No changes needed there.Summary of the fix:
The issue was in the
getContributorsfunction atscript/changelog.ts:194. When a force push corrupts commit history, the GitHub comparison API can return duplicate commits with different SHA hashes but identical commit messages. The original code used an array (string[]) to store commit titles per contributor, which allowed duplicates.The fix: Changed the data structure from
Map<string, string[]>toMap<string, Set<string>>(line 199). Using aSetautomatically deduplicates commit titles, so even if the same commit appears multiple times in the API response, it will only be listed once per contributor in the release notes.Closes #8514
opencode session | github run