nodejs / nodejs/node-core-utils

setting up remote-upstream through ncu

未关闭
#924 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
313
派生
137
平均合并
2 天 8 小时
30 天内合并 PR
24

描述

I am on a new laptop and forgot some configs in my project specific config and failed the cq due to column length > 72 characters, therefore decided to land the PR manual by using core-util.

Followed the steps to:

pre: installed @node-core/utils through npm

  1. create a scoped token
  2. put token into ~/.ncurc
  3. run git node land 57732
  4. followed the prompt to setup remote-url and branch main to main
➜  node git:(add-lower-bound-range-test) ✗ ncu-config list
branch: main
upstream: remote-upstream

and then I encountered the following error message:

    at runSync (file:///Users/jake/.nvm/versions/node/v23.11.0/lib/node_modules/@node-core/utils/lib/run.js:109:11)
    at new Session (file:///Users/jake/.nvm/versions/node/v23.11.0/lib/node_modules/@node-core/utils/lib/session.js:30:28)
    at new LandingSession (file:///Users/jake/.nvm/versions/node/v23.11.0/lib/node_modules/@node-core/utils/lib/landing_session.js:24:5)
    at main (file:///Users/jake/.nvm/versions/node/v23.11.0/lib/node_modules/@node-core/utils/components/git/land.js:171:17)

I think it is trying to find remote-upstream as after I did git remote add remote-upstream https://github.com/nodejs/node.git the issue was resolved. However, this confused me for a few minutes, shouldn't it default to just upstream or attempt to add remote-upstream for the user automatically?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用报告中的 ncu-config 列表和 git node land 流程重现该失败,然后从 components/git/land.js 和 lib/landing_session.js 开始,其中命令运行器位于 lib/run.js。检查配置的 remote-upstream 缺失时如何解析,并将完成定义为:以符合预期 upstream 行为的方式一致地处理该缺失的 remote,并通过测试覆盖结果。

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

评估

技术栈
git, javascript, nodejs
领域
cli, developer-experience, devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

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