Skip to content

Conversation

@opencode-agent
Copy link
Contributor

The iteration code on lines 252-256 will work fine with a Set since both Array and Set are iterable with for...of. No changes needed there.

Summary of the fix:

The issue was in the getContributors function at script/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[]> to Map<string, Set<string>> (line 199). Using a Set automatically 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

New%20session%20-%202026-01-14T18%3A00%3A14.499Z
opencode session  |  github run

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
@rekram1-node
Copy link
Collaborator

/oc no the problem was that commits were added twice because of a force push, see full changelog for reference:

Core
Fixed "load more" button behavior in desktop sidebar (@shanebishop1)
Fix plan mode when not in git worktree
Skip duplicate system prompt for Codex OAuth sessions (@zerone0x)
TUI
Fixed Docker image after SST rename in tips (@goniz)
Show connected providers in /connect dialog (@AksharP5)
Deduplicate file references in sent prompts (@felixzsh)
Track all timeouts in Footer component to prevent memory leaks (@sauerdaniel)
Make TUI work when OPENCODE_SERVER_PASSWORD is set (@LeonMueller-OneAndOnly)
SDK
Add missing metadata() and ask() definitions to ToolContext type (@danielmbrasil)
Thank you to 21 community contributors:

@LeonMueller-OneAndOnly:
fix(TUI): make tui work when OPENCODE_SERVER_PASSWORD is set (https://github.com/anomalyco/opencode/pull/8179)
fix(github): add persist-credentials: false to workflow templates (https://github.com/anomalyco/opencode/pull/8202)
fix(TUI): make tui work when OPENCODE_SERVER_PASSWORD is set (https://github.com/anomalyco/opencode/pull/8179)
@Eduard-Voiculescu:
docs: Update plan mode restrictions (https://github.com/anomalyco/opencode/pull/8290)
docs: Update plan mode restrictions (https://github.com/anomalyco/opencode/pull/8290)
@mthezi:
docs: add 302ai provider (https://github.com/anomalyco/opencode/pull/8142)
docs: add 302ai provider (https://github.com/anomalyco/opencode/pull/8142)
@danielmbrasil:
fix: add missing metadata() and ask() defintions to ToolContext type (https://github.com/anomalyco/opencode/pull/8269)
fix: add missing metadata() and ask() defintions to ToolContext type (https://github.com/anomalyco/opencode/pull/8269)
@sauerdaniel:
fix(tui): track all timeouts in Footer to prevent memory leak (https://github.com/anomalyco/opencode/pull/8255)
fix(mcp): close existing client before reassignment to prevent leaks (https://github.com/anomalyco/opencode/pull/8253)
fix(state): delete key from recordsByKey on instance disposal (https://github.com/anomalyco/opencode/pull/8252)
fix(tui): track all timeouts in Footer to prevent memory leak (https://github.com/anomalyco/opencode/pull/8255)
@felixzsh:
fix: deduplicate file refs in sent prompts (https://github.com/anomalyco/opencode/pull/8303)
fix: deduplicate file refs in sent prompts (https://github.com/anomalyco/opencode/pull/8303)
@usvimal:
fix(desktop): correct health check endpoint URL to /global/health (https://github.com/anomalyco/opencode/pull/8231)
@dbpolito:
feat(desktop): Adding Provider Icons (https://github.com/anomalyco/opencode/pull/8215)
fix(desktop): Revert provider icon on select model dialog (https://github.com/anomalyco/opencode/pull/8245)
feat(desktop): Ask Question Tool Support (https://github.com/anomalyco/opencode/pull/8232)
@Brendonovich:
console: reduce desktop download cache ttl to 5 minutes
@cmdr-chara:
feat: add Undertale and Deltarune built-in themes (https://github.com/anomalyco/opencode/pull/8240)
@zeke:
docs: document ~/.claude/CLAUDE.md compatibility behavior (https://github.com/anomalyco/opencode/pull/8268)
@vglafirov:
feat: Add GitLab Duo Agentic Chat Provider Support (https://github.com/anomalyco/opencode/pull/7333)
fix: Add Plugin Mocks to Provider Tests (https://github.com/anomalyco/opencode/pull/8276)
@dmmulroy:
fix(cli): mcp auth duplicate radio button icon (https://github.com/anomalyco/opencode/pull/8273)
@josephbharrison:
fix(prompt-input): handle Shift+Enter before IME check to prevent stuck state (https://github.com/anomalyco/opencode/pull/8275)
@AlanThiec:
fix: update User-Agent string to latest Chrome version in webfetch (https://github.com/anomalyco/opencode/pull/8284)
@zerone0x:
fix(session): skip duplicate system prompt for Codex OAuth sessions (https://github.com/anomalyco/opencode/pull/8357)
@AksharP5:
feat: show connected providers in /connect dialog (https://github.com/anomalyco/opencode/pull/8351)
@goniz:
fix(opencode): fix docker image after sst rename in tips (https://github.com/anomalyco/opencode/pull/8376)
@neriousy:
fix(app): file listing (https://github.com/anomalyco/opencode/pull/8309)
@ajzbc:
fix(ui): layout-bottom icons (https://github.com/anomalyco/opencode/pull/8330)
@shanebishop1:
fix(desktop): "load more" button behavior in desktop sidebar (https://github.com/anomalyco/opencode/pull/8430)

@opencode-agent
Copy link
Contributor Author

The fix looks correct. Let me verify the changes:

  1. Line 199: Map<string, Set<string>> - Using Set instead of array to store commit titles per contributor
  2. Line 207: new Set() - Initializing with a Set instead of an array
  3. Line 208: .add(title) - Using Set.add() instead of Array.push()

The iteration at lines 252-256 uses for...of which works with both Array and Set since both are iterable.

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 Set instead of an array, duplicate commit titles are automatically deduplicated per contributor.

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.

New%20session%20-%202026-01-14T18%3A30%3A46.417Z
opencode session  |  github run

@rekram1-node rekram1-node changed the title Use Set to dedupe contributor commits ci: dedup stuff in changelog Jan 14, 2026
@rekram1-node rekram1-node merged commit 87438fb into dev Jan 14, 2026
6 checks passed
ian-pascoe pushed a commit to ian-pascoe/opencode that referenced this pull request Jan 14, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
hugojosefson pushed a commit to hugojosefson/opencode that referenced this pull request Jan 15, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS]: Fix duplicate contributor entries in v1.1.20 release notes

2 participants