Skip to content

gh pipeline: integrate GitHub Pipeline as deployment source in deploy wizard#249

Draft
gambtho wants to merge 11 commits intoAzure:mainfrom
gambtho:ca/pr5-deploy-integration
Draft

gh pipeline: integrate GitHub Pipeline as deployment source in deploy wizard#249
gambtho wants to merge 11 commits intoAzure:mainfrom
gambtho:ca/pr5-deploy-integration

Conversation

@gambtho
Copy link

@gambtho gambtho commented Feb 12, 2026

Description

integrate GitHub Pipeline as deployment source in deploy wizard

Type of Change

  • New feature (non-breaking change which adds functionality)

Related Issues

Closes #[issue number]
Related to #[issue number]

Changes Made

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

Testing

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed

const json = JSON.stringify(tokens);
const saved = await secureStorageSave(STORAGE_KEY, json);
if (!saved) {
localStorage.setItem(STORAGE_KEY, json);

Check failure

Code scanning / CodeQL

Clear text storage of sensitive information High

This stores sensitive data returned by
a call to githubOAuthPost
as clear text.
This stores sensitive data returned by
a call to githubOAuthPost
as clear text.
@gambtho gambtho force-pushed the ca/pr5-deploy-integration branch 4 times, most recently from f99b2ea to d278a51 Compare February 14, 2026 21:36
gambtho and others added 11 commits February 14, 2026 16:42
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>
@gambtho gambtho force-pushed the ca/pr5-deploy-integration branch from d278a51 to 5d65608 Compare February 14, 2026 21:43
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.

1 participant