github / github/vscode-github-actions

Workflow dispatch fails for workflows in git submodules

未關閉
#596 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
660
分支
213
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
When attempting to trigger a GitHub Actions workflow located in a git submodule (e.g., `host/.github/workflows/deploy.yml`), the extension fails with a 404 "Not Found" error. The extension incorrectly attempts to dispatch the workflow to the parent repository instead of the submodule's separate GitHub repository.

**To Reproduce**
Steps to reproduce the behavior:
1. Have a git repository with a submodule that has its own separate GitHub repository
2. The submodule contains GitHub Actions workflows in `.github/workflows/`
3. Open the workflow file in VSCode
4. Right-click and select "Trigger Run" or use the GitHub Actions explorer
5. See error: `404 Not Found` or similar repository not found error

**Expected behavior**
The extension should:
1. Detect that the workflow is located in a git submodule
2. Identify the correct GitHub repository for that submodule
3. Dispatch the workflow to the correct repository, not the parent

**Screenshots**
The error appears in the VSCode debug console when attempting to dispatch a workflow in the web submodule:
Image
The extension is attempting to dispatch to the parent repository instead of the submodule's separate GitHub repository.

A user-facing error notification is displayed:
Image

**Note:** Request IDs and repository names in the screenshot have been redacted for privacy.

**Extension Version**
`v0.31.5`

**Additional context**
This occurs in monorepo setups where submodules are separate GitHub repositories with their own workflows.
```
monorepo/ (Parent repo: github.com/owner/monorepo)
└── submodule/ (Submodule: github.com/owner/submodule)
└── .github/workflows/
└── deploy.yml ← Should dispatch to submodule repo
```

The extension's workflow dispatch logic needs to be aware of git submodules and route dispatch requests to the appropriate repository.

貢獻指南

開啟貢獻指南

研究方向

Reproduce the failure with a parent repository containing a submodule workflow at .github/workflows/deploy.yml, using Trigger Run or the GitHub Actions explorer. Trace the workflow-dispatch path and how the opened file's repository is identified. Done means dispatching targets the submodule repository and the 404 no longer occurs.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, github-actions, typescript, vscode
領域
ci-cd, devtools
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。