dtslint-runner should not compare against master on DT PRs
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- shell, typescript
调研方向
定位 dtslint-runner 及其 git diff 逻辑,然后将其与 scripts/pnpm-install.sh 中对 merge-base 的处理进行比较。检查 CI 如何识别 pull request,以及 merge commit 如何暴露 HEAD^1。完成的标准是 PR 运行针对 PR 的稳定 merge-base 进行比较,而不是针对更新的 origin/master,从而不会将无关的 package 报告为已更改。
由索引模型根据 Issue 内容生成。
描述
dtslint-runner diffs against master. If someone merges a PR at the exact same time as another PR's CI runs, they'll pull origin/master and may get the wrong thing. For example, in https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/7452339628/job/20275379960?pr=68135:
Running: git rev-parse --verify master
Running: git fetch origin master
Running: git branch master FETCH_HEAD
Running: git diff master --name-status
M types/matter-js/index.d.ts
M types/slate-html-serializer/index.d.ts
M types/slate-html-serializer/tsconfig.json
Testing 2 changed packages: Set(2) { 'matter-js', 'slate-html-serializer' }
Testing 0 dependent packages: Set(0) {}
dtslint-runner fetches master, but gets a newer master than the PR, so it believes that the PR modified matter-js, when it was actually another PR merged to master. I partially fixed this for pnpm install in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/scripts/pnpm-install.sh; since PRs are run on merge commits in CI, HEAD^1 points to an already pulled / stable merge base (what the PR thinks master is at the time of the CI run; further runs will get newer merge bases so it's not out of date).
This then causes further failures because pnpm install is installing the "correct" dependency set, which does not include matter-js.
In CI, it's easy to tell that we're in a PR. But, I'm not totally sure of the right mechanism to check in dtslint-runner, but we should definitely do it.
- 主要语言
- TypeScript
- 星标
- 422
- 派生
- 238
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 8
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/DefinitelyTyped-tools 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 66/100
microsoft/DefinitelyTyped-tools#1324 · 8 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 32/100
microsoft/DefinitelyTyped-tools#1230 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
microsoft/DefinitelyTyped-tools#1229 ·
维护者通常 1 天内回复
-
mergebot staleness comments do not respect tooManyOwners可能已有人在做 @copilot-swe-agent 于 322 天前认领。 未关闭
microsoft/DefinitelyTyped-tools#1218 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 45/100
microsoft/DefinitelyTyped-tools#1211 · 1 条评论 ·
维护者通常 1 天内回复
查看 microsoft/DefinitelyTyped-tools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
wardian-app/Wardian#1603 ·
维护者通常 1 天内回复
-
Sign the pledge未关闭
难度 1/5 1 小时以内 新手友好度 85/100
input-output-hk/devx-updates#168 ·
维护者通常 1 天内回复
-
triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
agent-ready area: config area: skills type: chore upstream: brain-kit
难度 1/5 1 小时以内 新手友好度 95/100
-
dev experience frontend good first issue
难度 2/5 1-3 小时 新手友好度 78/100
cuttle-cards/cuttle#1403 ·
维护者通常 1 天内回复