gh pipeline: integrate GitHub Pipeline as deployment source in deploy wizard#249
Draft
gambtho wants to merge 11 commits intoAzure:mainfrom
Draft
gh pipeline: integrate GitHub Pipeline as deployment source in deploy wizard#249gambtho wants to merge 11 commits intoAzure:mainfrom
gambtho wants to merge 11 commits intoAzure:mainfrom
Conversation
f99b2ea to
d278a51
Compare
Extract runCommandAsync() into utils/shared/run-command.ts to provide a promise-based wrapper around Headlamp's pluginRunCommand bridge. Refactor az-cli.ts to use it, replacing the tryExec dispatch function with a directly exported runAzCommand helper that resolves the Azure CLI path. This is a prerequisite for the GitHub auth module which also needs runCommandAsync for curl calls.
Check for ERROR/error keywords in stderr rather than treating any stderr output as a failure, since Azure CLI may write harmless warnings to stderr during logout.
Add the GitHub integration foundation: - types/github.ts: shared types (GitHubRepo, RepoReadiness, workflow status) - github-auth.ts: OAuth device flow with PKCE, token refresh, git credential helper for HTTPS clones, secure storage via Electron safeStorage - github-api.ts: REST API wrapper for repos, PRs, workflows, GitHub App installation checks, and Copilot agent status - secure-storage.ts: thin wrapper around Electron's safeStorage IPC bridge with graceful fallback when not running in desktop mode All modules are pure utilities with no UI. Fully tested.
Add optional id/ownerId fields to GitHubRepo so the GitHub App install URL can pre-select the target repo via suggested_target_id and repository_ids[] query parameters. Also enrich listUserRepos to return these IDs from the API response. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the core logic layer for the GitHub pipeline deployment feature: - types.ts: pipeline deployment state enum, PipelineConfig, PipelineState - useGitHubPipelineState: state machine with localStorage persistence for crash recovery, typed transition methods, and reset capability - useGitHubAuth: React hook wrapping the OAuth device flow for component use - agentTemplates: generates copilot-setup-steps.yml and agent config markdown from PipelineConfig, with validation - pipelineOrchestration: createSetupPR() (multi-file commit via GitHub API) and triggerCopilotAgent() (issue creation for Copilot Coding Agent) All modules are heavily tested. No UI components yet — pure logic layer.
…back Add containerConfig to PipelineConfig so the Copilot agent issue and agent instructions include the full container configuration (image, ports, replicas, resource limits, env vars, health probes, HPA, security context). Fix saveTokens to fall back to localStorage when Electron secure storage is unavailable. Fix SET_AUTH_NEEDED to preserve lastSuccessfulState for correct post-auth resume. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add all UI components and their supporting polling hooks: - usePolling: generic polling hook with configurable interval and backoff - usePRPolling: tracks PR merge status and CI check conclusions - useWorkflowPolling: monitors GitHub Actions workflow runs - useDeploymentHealth: monitors K8s deployment/service health via Headlamp - useAgentPRDiscovery: discovers Copilot-generated PRs by naming convention - GitHubAuthScreen: OAuth device flow with code copy and countdown - AppInstallScreen: prompts user to install the GitHub App - RepoSelector: searchable repo picker with owner/repo display - AgentSetupReview: review config before creating the setup PR - PRStatusScreen: shows PR status with CI checks and merge button link - DeploymentStatusScreen: deployment progress with K8s pod/service health All components are pure presentational — state is managed by the orchestration hook in the next PR.
…esume Auto-advance past auth screen after successful GitHub login. Add pollNow to polling hooks so PR/agent status screens offer a "Check Now" button. Add "Close and Continue Later" option on waiting screens. Thread repo id/ownerId through RepoSelector for scoped app install URLs. Update AppInstallScreen layout for the scoped install flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…esume Auto-advance past auth screen after successful GitHub login. Add pollNow to polling hooks so PR/agent status screens offer a "Check Now" button. Add "Close and Continue Later" option on waiting screens. Thread repo id/ownerId through RepoSelector for scoped app install URLs. Update AppInstallScreen layout for the scoped install flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire up the GitHub Pipeline feature to the existing deploy flow: - useGitHubPipelineOrchestration: master hook that coordinates the state machine, all polling hooks, and action handlers into a single interface - GitHubPipelineWizard: renders the correct screen based on pipeline state - DeployButton: add 'GitHub Pipeline' option to deployment source menu - DeployWizard: route to GitHubPipelineWizard for github-pipeline source - SourceStep: add GitHub Pipeline card with description
…onfig Move GitHub Pipeline from a standalone source card to an option at the end of the Container Image deploy flow (behind feature flag). Add pipeline resume indicator on DeployButton that detects in-progress pipelines via localStorage and opens the wizard directly at the correct state. Thread containerConfig from deploy wizard through to the pipeline orchestration so the agent receives the full user configuration. Remove github-pipeline from source selection, add feature flag gate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d278a51 to
5d65608
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
integrate GitHub Pipeline as deployment source in deploy wizard
Type of Change
Related Issues
Closes #[issue number]
Related to #[issue number]
Changes Made
Wire up the GitHub Pipeline feature to the existing deploy flow:
machine, all polling hooks, and action handlers into a single interface
Testing