Conversation
There was a problem hiding this comment.
Pull request overview
Adds a foundational GitHub integration layer (OAuth + API wrapper) and shared utilities to support the upcoming pipeline feature.
Changes:
- Introduces Electron-driven GitHub OAuth with encrypted token persistence + refresh support.
- Adds an Octokit-based GitHub API wrapper for repo/workflow/PR/issue/status-check operations.
- Adds shared UI/util helpers (CopyButton, relative time formatting, external URL opener) and shared types/constants.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/aks-desktop/src/utils/shared/openExternalUrl.ts | Adds an Electron-aware external URL opener with protocol allowlist. |
| plugins/aks-desktop/src/utils/shared/formatTime.ts | Adds getRelativeTime helper for UI-friendly timestamps. |
| plugins/aks-desktop/src/utils/github/secure-storage.ts | Adds a thin wrapper around Electron safeStorage IPC methods. |
| plugins/aks-desktop/src/utils/github/github-auth.ts | Implements GitHub OAuth start/callback/refresh and token persistence helpers. |
| plugins/aks-desktop/src/utils/github/github-auth.test.ts | Adds tests for GitHub OAuth/token persistence utilities. |
| plugins/aks-desktop/src/utils/github/github-api.ts | Adds Octokit wrapper functions for repo readiness, workflows, PRs/issues, checks, etc. |
| plugins/aks-desktop/src/utils/github/github-api.test.ts | Adds tests for most GitHub API wrapper functions. |
| plugins/aks-desktop/src/types/project.ts | Adds shared ProjectDefinition type. |
| plugins/aks-desktop/src/types/github.ts | Adds shared GitHub-related types used across utils/components. |
| plugins/aks-desktop/src/hooks/useAzureContext.ts | Adds hook to resolve subscription/resource group/tenant from cluster info. |
| plugins/aks-desktop/src/components/shared/CopyButton.tsx | Adds reusable clipboard copy button with feedback tooltip. |
| plugins/aks-desktop/src/components/GitHubPipeline/constants.ts | Adds workflow/config path constants and Copilot bot user set. |
| headlamp | Updates submodule pointer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
91df6e9 to
86daedc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
86daedc to
ad8d1f0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ad8d1f0 to
7938538
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7938538 to
09420a9
Compare
illume
left a comment
There was a problem hiding this comment.
Thanks for the changes.
Looks like the git message subject lines need updating.
Unfortunately, there's a git conflict now.
7ae9aac to
1aeefed
Compare
|
fixed merge conflict, and updated headlamp submodule commit |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1aeefed to
329246b
Compare
|
This one also needs the related issue in the PR description. |
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
329246b to
449c89b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
449c89b to
40dbbea
Compare
Summary
Add the foundational GitHub integration layer needed by the pipeline feature:
desktopApi, with encrypted token persistence (safeStorage) and refresh token supportCopyButtoncomponent,useAzureContexthook,ProjectDefinitiontype,getRelativeTimehelper,openExternalUrlfor Electron-aware linksgetIssue,dispatchWorkflowwith inputs, file path constants, typed status checksChanges
GitHub Auth (
utils/github/)github-auth.ts— Browser OAuth flow viadesktopApi.startGitHubOAuth, callback listener, and token refresh through Electron main processsecure-storage.ts— ElectronsafeStoragewrapper with localStorage fallback for dev modegithub-auth.test.ts— Tests for OAuth start, callback, refresh, token expiry, and storageGitHub API (
utils/github/)github-api.ts— Octokit wrapper:listRepos,getRepoDetails,createBranch,commitFiles,createPullRequest,getPullRequest,getStatusChecks,dispatchWorkflow,getIssue,checkRepoReadiness,getCurrentUsergithub-api.test.ts— Comprehensive tests for all API functionsShared Utilities
types/github.ts—GitHubRepo,RepoReadiness, workflow typestypes/project.ts—ProjectDefinitionfor pipeline component propshooks/useAzureContext.ts— Resolves subscription, resource group, tenant from cluster infocomponents/shared/CopyButton.tsx— Clipboard copy with visual feedbackutils/shared/formatTime.ts—getRelativeTimehelperutils/shared/openExternalUrl.ts— Electron-aware external URL openerPipeline Constants
components/GitHubPipeline/constants.ts— Workflow and agent config file pathsTest plan
npm run tscpassesnpm run lintpasses (pre-commit hooks)npm test— github-auth and github-api test suites pass