mcpField
S
servicing-pr

servicing-pr

github.com/dotnet開発14.8k47 回インストール今日更新
リポジトリ

servicing-pr について

リリースブランチ向けの EF Core 保守プルリクエストを準備する開発スキルです。対象ブランチの選択、PR の記述形式、AppContext スイッチの適用条件を扱います。

主な機能

  1. 01保守ブランチの選定
  2. 02リリース PR のタイトルと説明テンプレート
  3. 03AppContext スイッチの適用指針
  4. 04PR 説明の検証

活用シーン

  1. 01リリースブランチ向けバグ修正のバックポート準備
  2. 02保守 PR に必須セクションがあるか確認
  3. 03修正にオプトアウトスイッチが必要か判断

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/dotnet/efcore --skill servicing-pr

インストール後、Claude Code で/servicing-prを入力して読み込まれたか確認します。

詳細

サービシング PR

release/* ブランチを対象とする PR では、指定された形式の説明文が必要です。また、該当する場合はクワーク(AppContext スイッチ)を含めてください。サービシング PR の進捗を更新する際は、説明文が引き続きテンプレートに従っていることを確認してください。

バックポート先のブランチ

  • バージョンが指定されている場合は、release/XX.0 を対象にします(例:backport to 10 → release/10.0)
  • 指定されていない場合は、最新の release/XX.0 ブランチを探します(release/11.0-preview2 のようなプレビュー ブランチは除外します)
  • PR を作成する前に、ブランチが存在することを確認してください

PR のタイトル

[release/XX.0] <original PR title>

PR の説明テンプレート

Fixes #{issue_number}
Backports #{source_pr_number_if_applicable}

**Description**
Provide information on the bug, why it occurs and how it was introduced. Put it in terms that developers can understand without knowledge of EF Core internals.

**Customer impact**
How the bug affects users without internal technical detail. Include a short (3-4 lines) code sample if possible. If data corruption occurs, state that explicitly. If a feasible workaround exists, briefly describe it and how discoverable it is, otherwise mention that there's no workaround.

**How found**
How the bug was discovered based on the information in the issue description. If user-reported, mention "User reported on <version>". If multiple users are affected, note that. Count the number of upvotes and comment authors to estimate impact.

**Regression**
Whether this is a regression from an earlier EF version. Add a link to the PR that introduced the regression if known. If it only affects a feature introduced in the same major version, it is not a regression.

**Testing**
State the number of new or modified tests, don't go into details. If test coverage is unfeasible, briefly explain the alternative validation approach that was used.

**Risk**
Brief risk assessment ranked from "extremely low" to "high". Note amount of code changed. If the fix is a one-liner, mention that. If a quirk was added, mention "Quirk added".

クワーク(AppContext スイッチ)

クワークを使うと、ユーザーは実行時に修正を無効化でき、パッチのリスクを軽減できます。修正が完全に明白でリスクがない場合や、ツールやアナライザーのようにクワークを使用できない場合は省略してください。

クワークの追加

コードを変更するクラスに追加します。

private static readonly bool UseOldBehavior37585 =
    AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37585", out var enabled) && enabled;
  • 37585 を該当する issue 番号に変更します
  • !UseOldBehavior37585 の条件で変更を囲み、スイッチを有効にすると修正が適用されないようにします。スイッチを確認する回数はできるだけ少なくしてください
  • PR で複数の issue を解決する場合は、スイッチ名に最も適切な issue を選びます
  • 推奨事項と段階的な実装を区別してください。ソースの変更にスイッチが実際に含まれていない限り、「クワークを追加しました」とは言わないでください

検証

  • PR の説明文がテンプレートに完全に従っている(すべてのセクションに記入されている)
  • 該当する場合、PR の説明文と一致する issue 番号を使ってクワークが追加されている

コメント