Skip to content

Comments

Fix GitHub integration settings#1045

Open
thisisharsh7 wants to merge 4 commits intogeneralaction:mainfrom
thisisharsh7:fix/github-integration-settings-1036
Open

Fix GitHub integration settings#1045
thisisharsh7 wants to merge 4 commits intogeneralaction:mainfrom
thisisharsh7:fix/github-integration-settings-1036

Conversation

@thisisharsh7
Copy link
Contributor

fixes #1036

@vercel
Copy link

vercel bot commented Feb 23, 2026

@thisisharsh7 is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link

greptile-apps bot commented Feb 23, 2026

Greptile Summary

This PR fixes GitHub integration settings by implementing proper logout from gh CLI and improving the login flow with a modal UI. The changes ensure that when users disconnect from GitHub in settings, both the keychain token and the gh CLI authentication are cleared. It also adds a device flow modal to provide better UX during GitHub authentication, and implements an event-based system to sync authentication state across multiple component instances.

Key changes:

  • Fixed github:logout IPC handler to return proper success/error responses
  • Updated GitHubService.logout() to clear both keychain and gh CLI auth in parallel
  • Added GithubDeviceFlowModal integration with polling to refresh status after authentication
  • Implemented github-auth-changed window event to synchronize auth state across hook instances
  • Added checkStatus() call after logout to immediately refresh UI state

Confidence Score: 3/5

  • This PR is mostly safe to merge but contains a Windows compatibility issue that will cause logout failures on that platform
  • The PR successfully fixes the GitHub settings integration and improves UX, but the hardcoded /bin/bash shell path in the logout function will break on Windows systems (which this Electron app supports per CLAUDE.md). The rest of the changes are sound - proper IPC responses, event-based state sync, and modal integration.
  • Pay close attention to src/main/services/GitHubService.ts - the logout function uses a hardcoded Unix shell path that won't work on Windows

Important Files Changed

Filename Overview
src/main/services/GitHubService.ts Updated logout to clear both gh CLI auth and keychain token; uses hardcoded /bin/bash shell which may fail on Windows
src/renderer/components/IntegrationsCard.tsx Added GitHub modal display and status polling after login/logout; includes 3-second polling with 15 attempts after successful auth

Last reviewed commit: 925c086

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

// Run both operations in parallel since they're independent
await Promise.allSettled([
// Logout from gh CLI
execAsync('echo "" | gh auth logout --hostname github.com', { shell: '/bin/bash' }).catch(
Copy link

Choose a reason for hiding this comment

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

hardcoded /bin/bash will fail on Windows

Suggested change
execAsync('echo "" | gh auth logout --hostname github.com', { shell: '/bin/bash' }).catch(
execAsync('echo "" | gh auth logout --hostname github.com').catch(

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.

[bug]: GitHub Integration Not Working in Settings

1 participant