Skip to content

fix(node-gha): preserve action release commit parents#157

Merged
dangreen merged 1 commit into
mainfrom
fix/node-gha-preserve-release-parents
Jun 29, 2026
Merged

fix(node-gha): preserve action release commit parents#157
dangreen merged 1 commit into
mainfrom
fix/node-gha-preserve-release-parents

Conversation

@dangreen

Copy link
Copy Markdown
Member

No description provided.

@coveralls

coveralls commented Jun 29, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28399353701

Coverage increased (+0.2%) to 64.171%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 4 of 4 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 844
Covered Lines: 602
Line Coverage: 71.33%
Relevant Branches: 465
Covered Branches: 238
Branch Coverage: 51.18%
Branches in Coverage %: Yes
Coverage Strength: 9.91 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the node-gha publish flow to avoid losing commit parent information when publishing from shallow Git clones (common in GitHub Actions), ensuring amended release commits keep their original ancestry.

Changes:

  • Detect shallow repositories during publish and fetch additional git history before creating/updating release refs.
  • Add a regression test that publishes from a --depth 1 clone and verifies parent preservation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/node-gha/src/publish.ts Detect shallow clones and fetch history/tags before checking out the release commit for publishing.
packages/node-gha/src/publish.spec.ts Add coverage for publishing from a shallow clone and validating commit-parent preservation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'--is-shallow-repository'
) === 'true'

if (isShallowRepository) {
Comment on lines +98 to +102
const project = new NodeGhaProject({
path: join(clonePath, 'package.json')
})

await project.gitClient.setConfig('user.name', 'Tester Testerson')
@dangreen dangreen force-pushed the fix/node-gha-preserve-release-parents branch from d4fc588 to 35d7445 Compare June 29, 2026 20:06
@dangreen dangreen merged commit 79e5515 into main Jun 29, 2026
6 checks passed
@dangreen dangreen deleted the fix/node-gha-preserve-release-parents branch June 29, 2026 20:09
@github-actions github-actions Bot mentioned this pull request Jun 29, 2026
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.

3 participants