feat: Git-Ape canvas for the GitHub Copilot app (deployments, setup, launchpad)
维护者通常 3 天内回复
@arnaudlh 已经在做这个了。
开始于 2026年11月25日。
评估
这个 Issue 还没有评估数据。
描述
Summary
Add a GitHub Copilot app canvas for Git-Ape: a side panel next to chat with three views.
- Deployments: browse the deployments in
.azure/deployments/and see existing drift automation status when configured. - Setup: check whether the repository is ready for Git-Ape onboarding.
- Launchpad: start the main Git-Ape agents and skills with one click.
It is a Copilot CLI extension in .github/extensions/git-ape-deployments/. The Copilot app loads it automatically for sessions in this repository, and users can install it at user scope to use it in any repository.
Problem
Git-Ape keeps its state in files and in GitHub: deployment artifacts under .azure/deployments/<id>/ (metadata.json, state.json, tests.json, architecture.md, template.json, logs), plus workflow files, environments and secrets. To answer simple questions, users must read JSON files, run az and gh commands, or ask the agent:
- Which deployments exist, what state are they in, and did their tests pass?
- What does a deployment's architecture look like?
- What did the last automated drift check find, and is that report still from the latest run?
- Is this repository ready for onboarding, and what is missing?
- Which agent or skill should I use to start?
The Copilot app has no visual entry point for any of this.
Proposal
Deployments view
- A list of deployments, newest first, with a status badge, project, environment and region, and a search box.
- Detail tabs for the selected deployment:
- Overview: summary, managed resources, integration test results and the selected deployment's reported drift status.
- Architecture: the Mermaid diagrams from
architecture.md. - Template: parameters, outputs and resources, including resources inside nested deployments.
- Logs:
deployment.log,error.logandrollback.log(last 16 KB). - Files: the files in the deployment folder.
- The view refreshes live when files under
.azure/deployments/change. - Buttons that send a prompt to chat for the selected deployment: Ask Copilot to summarize, Check drift (
azure-drift-detector) and Re-run tests (azure-integration-tester).
Existing drift automation status
This is part of the Deployments view, separate from the Check drift button that requests a new check.
- Detect runnable
git-ape-drift*.yml/.yamlworkflows under.github/workflows, includinggit-ape-drift.lock.yml. Hide the status section when none is configured; ignore unrelated workflows with "drift" in their names. - Show the latest run of each detected workflow, its status/conclusion, timestamp and a link to the run.
- Read the newest
[drift-status]report issue with thedrift-statuslabel. Display the check timestamp, tracked/deployments-with-drift counts, and a link to the report. - Match deployment IDs to the report's Deployments table. Show reported no-drift, drift count/severity, skipped or unknown in deployment cards and Overview. Preserve qualifications such as suppressed findings.
- Distinguish report findings from workflow execution status. A successful run without a report is not evidence of no drift. Failed/in-progress newer runs or unmatched reports make previous findings visibly stale; inaccessible or unparseable data is Unknown, never green.
- Fetch automatically in the Deployments view, cache GitHub reads for five minutes, and provide Refresh drift status. Refresh reads existing results only; it never dispatches a workflow or changes Azure.
- Use the session's existing GitHub CLI authentication and repository context. Surface missing CLI, sign-in, SSO and permission errors without changing accounts.
Setup view
A read-only checklist of what git-ape-onboarding needs:
| Group | Checks |
|---|---|
| CLI tools | az 2.50 or later, gh 2.0 or later, jq 1.6 or later, git |
| Sign-in | az account show and gh api user |
| Repository files | The four git-ape-*.yml workflows and copilot-instructions.md. The drift workflow is optional. |
| GitHub configuration | Admin permission, default branch main, the azure-deploy and azure-destroy environments, the AZURE_CLIENT_ID and AZURE_TENANT_ID secrets, and the AZURE_SUBSCRIPTION_ID variable. COPILOT_GITHUB_TOKEN is optional. |
- Repository files are checked every time the view loads. The CLI and GitHub checks run only when the user selects Run checks.
- When organization SAML SSO blocks the
ghtoken, the check shows Unknown and explains how to authorize it. - Start onboarding runs the
git-ape-onboardingskill and includes the current gaps in the prompt. Check prerequisites with Copilot runs theprereq-checkskill.
Launchpad view
| Card | Runs |
|---|---|
| New deployment | Git-Ape agent |
| Import existing resources | Azure IaC Exporter agent |
| Architecture review | Azure Principal Architect agent |
| Policy compliance | Azure Policy Advisor agent |
| Find skills | git-ape-skills skill (search only, no install) |
Every button only sends a prompt to chat. The skills and agents keep their own confirmation gates, so nothing changes in Azure or GitHub until the user approves it in chat.
Agent actions
Copilot can drive the canvas too:
| Action | Description |
|---|---|
refresh |
Rescans the deployments directory and returns deployment summaries. |
show_deployment |
Selects a deployment and returns its summary, resources, tests and file list. |
get_selection |
Returns the deployment the user has selected. |
show_view |
Switches to the deployments, setup or launchpad view. |
get_setup_status |
Returns the onboarding checklist. With run: true, runs the CLI and GitHub checks first. |
get_drift_status |
Reads existing drift workflow runs and the latest report. With refresh: true, bypasses the five-minute cache; never starts a check. |
Open input: view, deploymentId and deploymentsDir (defaults to .azure/deployments).
Use in other repositories
The project copy loads only in this repository. The README shows how to copy the folder to ~/.copilot/extensions/git-ape-deployments/ (bash and PowerShell). The user copy reads the repository of the current session. In this repository it steps aside, so the project copy is used and the canvas ID stays unique.
Security design
- The canvas is read-only. It never changes deployment artifacts, repository settings or Azure resources.
- Setup checks run
az,gh,jqandgitthroughexecFilewith fixed arguments, no shell and a 20-second timeout. Only the names of secrets and variables are read, never their values. Error text is replaced with a fixed message or cut to one line of 160 characters at most. - Drift status uses read-only
gh run listandgh issue listcalls. Report content is untrusted data, rendered as text rather than executed or injected as HTML. - Prompts are built on the server from a fixed list. The page sends only an intent ID and, where needed, a deployment ID.
- Each panel runs its own server on
127.0.0.1with a random port. POST requests need a per-panel token andContent-Type: application/json. - Deployment IDs must match a strict pattern and stay inside the deployments directory.
- Artifact content is rendered as text. Mermaid renders with
securityLevel: "strict". A pinned Mermaid 11.17.2 bundle is downloaded once, checked against a SHA-384 hash, cached under~/.copilot/extensions/git-ape-deployments/artifacts/and served locally. The page never loads remote scripts. If the download fails, the diagram source is shown instead.
Implementation
A local prototype exists, but its code has not been committed or pushed. This issue records the proposed behavior and implementation scope; it does not indicate that the extension has shipped.
| File | Purpose |
|---|---|
extension.mjs |
Canvas definition, agent actions and the local HTTP server |
lib/deployments.mjs |
Reads deployment artifacts |
lib/setup.mjs |
Read-only onboarding checks |
lib/drift.mjs |
Workflow discovery, existing run/report reads, report parsing, freshness and cache |
lib/intents.mjs |
The fixed list of chat prompts |
lib/mermaid-bundle.mjs |
Pinned Mermaid download, hash check and cache |
ui/ |
index.html, app.js and styles.css, using the app theme tokens for light and dark mode |
README.md |
Usage, install in other repositories, actions and security notes |
There is no package.json and no new dependency: the Copilot CLI provides the SDK. No existing skill, agent or workflow changes.
Testing
- Tested in this repository with sample deployments in different states (succeeded, failed, destroy requested): Mermaid rendering, live refresh, the setup checks (including the SAML case) and the token check on POST requests.
- Tested the user-scope copy against another repository that uses Git-Ape: repository detection, deployments and setup checks.
- Drift status: six focused Node tests cover workflow discovery, report parsing, stale/failed/in-progress runs, missing reports, authorization errors, caching and refresh. Browser fixtures verify reported drift and stale findings in cards and Overview; the real canvas endpoint enforces the refresh token and hides status without automation.
- Live status retrieval from the other repository currently returns Unknown with the session's GitHub identity. Successful live-report retrieval still needs verification with an authorized account.
Follow-ups
- Confirm successful live-report retrieval with an authorized GitHub identity before shipping.
- Add a page to the website docs.
- Decide whether to ship the canvas with the Git-Ape plugin, so users don't have to copy it by hand.
- 主要语言
- JavaScript
- 星标
- 282
- 派生
- 50
- 平均合并
- 4 天 20 小时
- 30 天内合并 PR
- 18
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/git-ape 的其他 Issue
-
daily-status report
难度 1/5 1 小时以内 新手友好度 1/100
维护者通常 3 天内回复
-
report workshop-coverage
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 3 天内回复
-
agentic-workflows workshop workshop-sync
难度 2/5 1-3 小时 新手友好度 18/100
维护者通常 3 天内回复
-
agentic-workflows
难度 4/5 3-5 天 新手友好度 42/100
维护者通常 3 天内回复
-
agentic-workflows
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 3 天内回复
相似的 Issue
-
[workshop-sync] workshop/06-install-gh-aw.md: example version output is outdated (0.81.6 vs v1.2.2)未关闭documentation
难度 1/5 1 小时以内 新手友好度 84/100
githubnext/gh-aw-workshop#6467 ·
维护者通常 1 天内回复
-
bug good first issue help wanted up-for-grabs
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/loom#2075 ·
维护者通常 1 天内回复
-
fix
难度 2/5 1-3 小时 新手友好度 68/100
idean3885/claude-ops-agent#1367 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
cytoscape/cytoscape-web#1032 ·
维护者通常 1 天内回复
-
channels:add check:passed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复