Skip to content

Check for git and gh CLI tools when GitHub mode is enabled #229

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

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

bhouston
Copy link
Member

This PR adds a new feature to check for git and gh CLI tools when GitHub mode is enabled.

Changes

  • Added a new utility function checkGitCli() that checks:
    • If git CLI is available
    • If gh CLI is available
    • If gh CLI is authenticated
  • Added warning messages when GitHub mode is enabled but required tools are missing
  • Added unit tests for the new functionality

Implementation

The implementation adds a check in the main command handler that runs when GitHub mode is enabled. If git or gh CLI tools are not available or gh is not authenticated, appropriate warning messages are displayed to the user.

This helps users understand why GitHub mode might not be working as expected and provides guidance on how to fix the issues.

Fixes #217

Implements a utility function to check if git and gh CLI tools are available
and if gh is authenticated when GitHub mode is enabled.

- Created gitCliCheck.ts utility with functions to check git/gh availability
- Added warning messages when GitHub mode is enabled but tools are missing
- Added unit tests for the new functionality

Fixes #217
@bhouston bhouston merged commit 8996f36 into main Mar 12, 2025
1 check failed
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.

If githug mode is enabled, ensure that gh and git cli commands exist on the shell, otherwise warn.
1 participant