github / github/vscode-github-actions

Setting upstream pushurl to a bad value to prevent pushing prevents branch from being used to find Actions info

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

描述

**Describe the bug**

If `pushurl` has been set to prevent a remote from being pushable (which I tend to do in order to ensure I never ever push upstream, https://stackoverflow.com/a/10260389), then the extension is unable to find any info about the repo, workflows, secrets, etc.

**To Reproduce**
Steps to reproduce the behavior:
1. Check out a fork.
1. Add an upstream.
1. Set `upstream` to be unpushable using (`git remote set-url --push upstream no_push`)
1. Set `"github-actions.remote-name": "upstream"` in `settings.json`.

**Expected behavior**

The repo works as normal. After all, all of the other settings point to the right places:

```ini
[remote "upstream"]
url = git@github.com:microsoft/TypeScript.git
fetch = +refs/heads/*:refs/remotes/upstream/*
gh-resolved = base
pushurl = no_push
```

**Screenshots**

With pushurl set:

![image](https://github.com/github/vscode-github-actions/assets/5341706/9f8522a6-c9c8-4b08-9543-ff74b0c2a7c4)

![image](https://github.com/github/vscode-github-actions/assets/5341706/26b41309-3104-40c2-bd8c-4e314c799701)

With it unset:

![image](https://github.com/github/vscode-github-actions/assets/5341706/b78588fe-a5de-4888-9f51-900d90ae786a)

![image](https://github.com/github/vscode-github-actions/assets/5341706/1e8d873e-dbbd-4b39-bc8d-c31248e3d168)

**Extension Version**
`v0.26.2`

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 github-actions.remote-name 設定如何解析上游 remote,以及如何讀取其 Git 設定。使用值為 no_push 的 pushurl 重現此問題,然後驗證 repository、workflow 和 secrets 資訊仍然是從 remote 的 url 和 fetch 設定載入,而不是因為 pushurl 而遭到拒絕。

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

評估

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

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

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