Skip to content

Log Git initialization failures before REST fallback - #2560

Open
mameikagou wants to merge 1 commit into
actions:mainfrom
mameikagou:fix/log-git-init-failure-2435
Open

Log Git initialization failures before REST fallback#2560
mameikagou wants to merge 1 commit into
actions:mainfrom
mameikagou:fix/log-git-init-failure-2435

Conversation

@mameikagou

Copy link
Copy Markdown

Summary

  • report the Git command manager initialization error before falling back to the REST API
  • add a regression test that verifies the diagnostic and preserves the existing fallback behavior
  • rebuild dist/index.js

This makes version and sparse-checkout failures visible without changing the current LFS or REST fallback semantics.

Closes #2435

Testing

  • npm test -- --runInBand
  • npm run format-check
  • npm run lint
  • npm run build

Copilot AI lite review requested due to automatic review settings August 25, 2026 22:11

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 makes Git initialization failures visible by logging the underlying createCommandManager error message before falling back to the REST-based download path, and adds a regression test to ensure the diagnostic is emitted while preserving existing fallback behavior.

Changes:

  • Log a clear info-level message when getGitCommandManager fails to initialize the CommandManager, including the error message.
  • Add a Jest regression test covering the “Git init fails → log reason → REST fallback still happens” behavior.
  • Rebuild dist/index.js to reflect the source change in the published action bundle.

Reviewed changes

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

File Description
src/git-source-provider.ts Logs the Git CommandManager initialization failure message before returning undefined to trigger REST fallback.
__test__/git-source-provider.test.ts Adds a regression test asserting the info log is emitted and REST download fallback still occurs.
dist/index.js Updates the bundled output to include the new failure log behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

Errors from initializing the gitCommandManager are ignored and never displayed

3 participants