Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

find_referenced_groups: Fixes-keyword ID list spans newlines, linking wrong issues as fixed

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

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

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

2026年9月30日 から。

  • #126044 @CodeAlex52 による — オープン

評価

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

調査の方向性

src/sentry/utils/groupreference.py の _fixes_re から始め、Commit.find_referenced_groups() と PullRequest.find_referenced_groups() を追って、抽出された ID がどのように解決済みの参照になるかを理解します。改行が続く fixes キーワードのカバレッジを追加し、「Fixes A-1, B-2」のような同一行のリストが引き続き機能することを確認します。また、説明文中の ID が修正済みとして扱われないことも確認します。

索引モデルが issue の本文から書いたものです。

説明

Product Area: Releases Waiting for: Product Owner

_fixes_re in src/sentry/utils/groupreference.py:

_fixes_re = re.compile(
    rf"\b{_fix_keywords}:?\s+([A-Za-z0-9_\-\s\,]+)\b",
    re.I,
)

The \s inside the ID-list character class also matches newlines, so the match swallows every line after the keyword, and _short_id_re then pulls short-ID-shaped tokens out of narrative prose. For example:

Fixes SENTRY-1
Backported from OTHER-456 for the release branch

The IDs treated as fixed come out as ['SENTRY-1', 'OTHER-456'], when only SENTRY-1 was meant.

This matters because Commit.find_referenced_groups() and PullRequest.find_referenced_groups() feed the resolved_in_commit / resolved_in_pull_request receivers, which create GroupLink(relationship=resolves) records. A phantom ID that happens to resolve to a real group in the org can then get auto-resolved by a release containing that commit. The \s was clearly intended for same-line separators like Fixes A-1, B-2, not newlines.

(find_fix_statements, used by the Seer RPC path, works per-line and is not affected.)

Observed on master at bb47162e (2026-09-25).

主要言語
Python
スター
45.7k
フォーク
5k
平均マージ
1日 2時間
マージ済み PR(30日)
651

環境構築

はじめの一歩

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

getsentry/sentry のほかの issue

getsentry/sentry の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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