github / github/vscode-github-actions

Throws an Error when used without Git

未关闭
#453 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
TypeScript
星标
660
派生
213
PR 合并指标
30 天内没有已合并 PR

描述

**Describe the bug**
When using a VCS like JJ, the extension crashes with "Unable to Connect to the GitHub API, please check your internet connection."

**To Reproduce**
Steps to reproduce the behavior:
1. Put `git.disabled` in your .vscode/settings.json
2. Open actions pane

**Expected behavior**
It shouldn't require the Git extension, only provide optional features (like current branch).

**Screenshots**
```
2025-03-14 12:38:40.980 [error] Error: Git model not found
at s.getAPI (/Users/dukese01/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:805076)
at new _d (/Users/dukese01/.vscode/extensions/github.vscode-pull-request-github-0.106.0/dist/extension.js:2190:26346)
at Function.createProvider (/Users/dukese01/.vscode/extensions/github.vscode-pull-request-github-0.106.0/dist/extension.js:2190:26938)
at gw (/Users/dukese01/.vscode/extensions/github.vscode-pull-request-github-0.106.0/dist/extension.js:2190:32572)
at kf (/Users/dukese01/.vscode/extensions/github.vscode-pull-request-github-0.106.0/dist/extension.js:2526:6481)
at G4 (/Users/dukese01/.vscode/extensions/github.vscode-pull-request-github-0.106.0/dist/extension.js:2526:7586)
```

**Extension Version**
`v0.27.1`

**Additional context**
Feel free to close as wontfix, I know this isn't exactly the recommended workflow :)
As I think about it, can you even figure out the connected repo without Git? IDK.

贡献指南

打开贡献指南

调研方向

通过在 .vscode/settings.json 中设置 git.disabled 并打开操作窗格来复现崩溃。跟踪创建依赖 Git 的 provider 的扩展启动路径,然后验证在没有 Git 扩展的情况下操作窗格仍可打开,同时当前分支等可选功能可能不可用。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, github, typescript, vscode
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。