Backend issue lists report in-patch warnings and out-of-patch errors as not publishable

オープン 初心者向け
#3,794 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@RaphaelFakhri がすでに取り組んでいます。

2026年11月4日 から。

  • #3795 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
django, python

調査の方向性

まず、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: false for warnings inside the patch.
  • publishable: false for errors outside the patch, and null when in_patch is 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

  1. Link an error issue to a diff with in_patch=False, and a warning issue with in_patch=True.
  2. Request /v1/diff/<diff_provider_id>/issues/.

Expected: both issues have publishable: true.
Actual: both issues have publishable: false.

主要言語
Python
スター
68
フォーク
54
平均マージ
2日 4時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mozilla/code-review のほかの issue

mozilla/code-review の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。