feat: add pipeline state machine and Copilot orchestration infrastructure#327
Draft
gambtho wants to merge 5 commits intoAzure:mainfrom
Draft
feat: add pipeline state machine and Copilot orchestration infrastructure#327gambtho wants to merge 5 commits intoAzure:mainfrom
gambtho wants to merge 5 commits intoAzure:mainfrom
Conversation
8c9aff5 to
f4f58e5
Compare
Collaborator
|
@gambtho can you please add the related issue(s)? |
Add GitHub OAuth authentication using Electron's native browser OAuth flow via desktopApi (startBrowserOAuth + onOAuthCallback). Includes token refresh, expiry checking, and encrypted token persistence via Electron safeStorage with localStorage fallback for dev mode.
Add foundational types and utilities needed across the pipeline feature: - ProjectDefinition type for project props used by pipeline components - useAzureContext hook to resolve subscription, resource group, and tenant from cluster info - getRelativeTime helper for human-readable timestamps - openExternalUrl for Electron-aware external link handling - CopyButton component for clipboard copy with visual feedback
Add Octokit-based GitHub API wrapper for repository listing, workflow dispatch, and file operations. Includes pipeline-specific operations: issue tracking, linked PR discovery, and status checks. Define GitHub repo, workflow, and run types. Extract workflow and agent config file path constants. Scope app install URL to selected repos.
…structure Add core infrastructure for managing pipeline deployment lifecycle: - PipelineDeploymentState enum with 14 states from Configured through Deployed, plus error states - Reducer-based state machine with validated transitions, localStorage persistence, and schema versioning - Generic polling hook with configurable intervals, max polls, and auto-stop conditions - Pipeline storage utilities for detecting active/resumable pipelines - GitHub OAuth browser flow hook with token refresh, session restore, and concurrent-refresh deduplication via mutex - GitHubAuthProvider context for sharing auth state across independently mounted Headlamp plugin components
…ration utilities Add template generation and multi-step orchestration for Copilot-based CI/CD pipeline setup: - Probe helpers for rendering health check configs as markdown and YAML - Agent template generator producing setup workflow YAML and Copilot agent instructions with full AKS deployment parameters - Pipeline orchestration: createSetupPR creates a branch, commits workflow + agent config, and opens a PR; triggerCopilotAgent creates a parameterized issue and assigns it to Copilot - Config validation (namespace regex, required IDs, image tag format) - Test fixtures for pipeline and container configuration
f4f58e5 to
1402d1d
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.
Summary
Add core infrastructure for the Copilot-assisted CI/CD pipeline deployment feature. This PR introduces the state machine, auth, and orchestration layers that the pipeline UI components will build on.
What's included
PipelineDeploymentStateenum with reducer-based transitions, localStorage persistence, and schema versioningusePollingwith configurable intervals, max polls, and auto-stop conditionscreateSetupPR(branch, commit, open PR) andtriggerCopilotAgent(parameterized issue creation)Testing
npm run tscpasses at each commitCommits
useGitHubAuth,GitHubAuthProvider, pipeline storage