Repo checker: a clean result on two targets says "a wheel for all 2 targets"

未关闭 适合新手
#255 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
frontend, web-dev

调研方向

错误的措辞来自 site/check/check-logic.mjs 中 verdictText() 里的 where 这一行,它在有两个目标时显示“全部 2 个目标”。在 Node 中把 targets 设为 1、2、3 并调用 verdictText 即可复现。完成的标准是:两个目标时标题显示“两个目标”,一个目标和三个及以上目标的措辞保持不变,并且 node --test tests/site/check-logic.test.mjs 通过,其中包含针对 1、2、3 个目标的新用例,且分别涵盖有和没有 notChecked 包的情况。

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

描述

bug good first issue

A clean result on two targets gets the headline "All 3 packages have a wheel for all 2 targets". Read from verdictText() in site/check/check-logic.mjs on main and run in Node:

verdictText({packages: 3, gaps: 0, unknown: 0, targets: 2})  ->  "✓ All 3 packages have a wheel for all 2 targets"
verdictText({packages: 3, gaps: 0, unknown: 0, targets: 5})  ->  "✓ All 3 packages have a wheel for all 5 targets"

"all 2" isn't how anyone says it; "both targets" is. Two targets is a common pick (Linux x86_64 and Linux ARM64, say), so this is the headline many visitors see first. The gaps headline for two targets ("at least one of the 2 targets") reads fine and isn't part of this.

Where

verdictText() in site/check/check-logic.mjs: const where = h.targets === 1 ? "this target" : \all ${h.targets} targets`;`

What to do

  • Make where "both targets" for 2, keep "this target" for 1 and "all N targets" for 3 or more.
  • Check whether any other text built from the same count says "all 2" (shareText() says "2 platforms", which is fine) and fix it the same way if so.

Done when

  • Tests in tests/site/check-logic.test.mjs for 1, 2 and 3 targets, with and without packages left unchecked (notChecked). The 2-target ones fail on main.
  • node --test tests/site/check-logic.test.mjs passes. The tests need no network.
主要语言
JavaScript
星标
0
派生
0
平均合并
1 小时 37 分钟
30 天内合并 PR
134

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

wheelgap/tracker 的其他 Issue

查看 wheelgap/tracker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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