メモ
GitHub Code Quality は現在 パブリック プレビュー にあり、変更される可能性があります。 パブリック プレビュー の間、Code Quality は課金されませんが、Code Quality スキャンでは GitHub Actions 分が消費されます。
Understanding why your pull request is blocked
Repository administrators can set code quality gates for maintainability and reliability using GitHub Code Quality. When you open a pull request, a scan automatically runs to check your changes against these standards.
If your pull request introduces code that falls below the required quality threshold, you’ll see a merge block banner at the bottom of the pull request in the Checks section: "Merging is blocked: Code quality findings were detected."

These checks help maintain a healthy, maintainable codebase and prevent technical debt from accumulating.
Viewing scan results and their severity levels
The results of the scan are reported as comments on your pull request, left by the github-code-quality[bot]. Each comment corresponds to a specific code quality problem that was detected in your changes.
Comments are labeled by severity (Error, Warning, Note). To learn more about what the severity levels mean, see Severity levels.
Determining which findings are blocking your pull request
The quality gate set by repository administrators defines the minimum severity level that will block merging.
The merge block banner may specify the minimum severity level. All findings at that severity level or higher must be addressed before you can merge your pull request.

メモ
If you don't see a severity level defined in the merge block banner, it means that your repository is using the most stringent code quality thresholds, which require all findings to be addressed before merging.
Fixing or dismissing each finding
In order to unblock your pull request, you need to resolve each required finding by deciding whether to fix the issue in your code or dismiss the comment.
Leveraging Copilotの自動修正 and Copilot コーディング エージェント to fix findings
Copilotの自動修正
pull request に関するコメントには、pull request に直接コミットできる 推奨自動修正 が含まれています。 ロジック、セキュリティ、スタイルに関して推奨される自動修正を慎重に確認し、[ 提案のコミット] をクリックします。
これらの提案を適用するためにCopilot ライセンスは必要ありません。
Copilot コーディング エージェント
または、Copilot ライセンスをお持ちの場合は、修復作業を Copilot コーディング エージェント に委任できます。
@Copilotに言及している pull request にコメントし、Copilot が検出された問題を解決することを要求します。

Copilot は、コメントに目の絵文字 (👀) で応答し、新しいエージェント セッションを開始し、必要な修正を含む pull request を開きます。
Copilot コーディング エージェントの作業を追跡できます。
- pull request では、作業の進行状況に応じて概要が更新されます。
-
[エージェント ページ](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text)またはセッション ログの使用については、[AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions) を参照してください。
Copilot コーディング エージェント を呼び出すには、Copilot ライセンスが必要です。
Copilot にサインアップする
Dismissing the finding
コードベースのコンテキストで関連性がない場合、またはアクション可能でない場合は、結果を無視できます。 結果を無視する一般的な理由は次のとおりです。
- この結果は、管理されなくなったレガシ コードにあります。
- これは、チームのコーディング標準に対する既知の例外です。
- これは、実際の品質リスクをもたらさない偽陽性です。
無関係なアラートを無視すると、品質チェックが意味のある問題に焦点を当て続けます。
Verifying that you've met the requirements
To see if you've met the code quality requirements, look at the "Checks" section at the bottom of your pull request. The merge block banner should no longer be present, and you should be able to merge your changes as usual.
Next steps
Reduce technical debt by fixing findings in recently changed files. See Improving the quality of recently merged code with AI.