Backend issue lists report in-patch warnings and out-of-patch errors as not publishable
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
首先找到 IssueViewSet 和 IssueCheckDetails 中的 publishable 注解,然后将它们与 IssueLink.publishable 属性以及 issue 中描述的共享 publishable 规则进行比较。检查 diff issues 端点和 check details 过滤器,确认补丁内的警告和补丁外的错误。完成标准是两个端点都将这些情况报告为 publishable,并且默认的 check details 过滤器保持一致。
由索引模型根据 Issue 内容生成。
描述
IssueLink.publishable treats an issue as publishable when it is in the patch or is an error (in_patch is True or level == "error"). The bulk creation response, the publishable filter of the check details endpoint, and the publishable counters for diffs and check stats use the same rule.
Two endpoints compute the publishable field with & instead of |:
GET /v1/diff/<diff_provider_id>/issues/(IssueViewSet)GET /v1/check/<repository>/<analyzer>/<check>/(IssueCheckDetails)
.annotate(publishable=Q(issue_links__in_patch=True) & Q(level=LEVEL_ERROR))
As a result, these endpoints return:
publishable: falsefor warnings inside the patch.publishable: falsefor errors outside the patch, andnullwhenin_patchis unknown.
On the check details endpoint, the default ?publishable=true filter keeps these issues while each one reports publishable: false.
The annotation came in with #2451, which moved publishable to IssueLink. The model property kept the or rule.
Steps to reproduce
- Link an error issue to a diff with
in_patch=False, and a warning issue within_patch=True. - Request
/v1/diff/<diff_provider_id>/issues/.
Expected: both issues have publishable: true.
Actual: both issues have publishable: false.
- 主要语言
- Python
- 星标
- 68
- 派生
- 54
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 24
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mozilla/code-review 的其他 Issue
-
ensure results are returned even when `code-review` task doesn't run automatically可能已有人在做 @bhearsum 于 13 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 25/100
mozilla/code-review#3740 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
mozilla/code-review#3739 · 1 条评论 ·
维护者通常 1 天内回复
-
use one try push for linting and build/test可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
mozilla/code-review#3738 ·
维护者通常 1 天内回复
-
support performance profiles in tasks可能已有人在做 @La0 于 14 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 30/100
mozilla/code-review#3737 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
mozilla/code-review#3710 ·
维护者通常 1 天内回复
查看 mozilla/code-review 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/onnxscript#3155 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug docs severity:low
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
docs good first issue
难度 2/5 1-3 小时 新手友好度 76/100