Skip to content

Respect empty previous-build changelog and avoid backfilling older repo history#8

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-empty-commit-list
Draft

Respect empty previous-build changelog and avoid backfilling older repo history#8
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-empty-commit-list

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

When the latest prior build has an intentionally empty commit list, changelog collection could skip it and continue searching older builds, producing an oversized/full-history changelog. This change treats that empty list as authoritative and publishes an empty changelog for the new build.

  • Changelog boundary behavior

    • In PublishToFillTask#gatherCommits, added an early return when the latest previous build’s commits list is empty.
    • This prevents fallback to older builds with commits and avoids traversing unrelated history.
  • Implementation detail

    • Added hasLatestBuildWithEmptyCommits(List<BuildResponse>) to centralize and clarify the guard logic.
  • Focused unit coverage

    • Added PublishToFillTaskTests for:
      • latest build has empty commits → guard triggers
      • latest build has commits → guard does not trigger
      • no builds → guard does not trigger
if (!builds.isEmpty()) {
  if (hasLatestBuildWithEmptyCommits(builds)) {
    return commits; // keep changelog empty by design
  }
  // existing previous-commit linear ancestry handling continues
}

Copilot AI changed the title [WIP] Fix empty commit list issue when no previous commit found Respect empty previous-build changelog and avoid backfilling older repo history Apr 3, 2026
Copilot AI requested a review from jpenilla April 3, 2026 21:48
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.

Use empty commit list when we use an empty commit due to unable to find previous commit with linear to current

2 participants