Skip to main content
Select language: current language is Russian
Поискайте или спросите Copilot
Открыть меню
Свернуть боковую панельРазвернуть боковую панель

Fixing code quality findings on a pull request

Keep quality issues out of your default branch by applying autofixes, delegating remediation work to Copilot, or dismissing irrelevant findings.

Кто может использовать эту функцию?

Пользователи с доступом на запись

GitHub Team или GitHub Enterprise Cloud

Совет

If you're new to Code Quality, see Preventing code quality issues from reaching your default branch for a guided walkthrough of how Code Quality works on pull requests.

How Code Quality works on pull requests

When you open a pull request, Code Quality runs two types of analysis and posts findings as comments on the pull request.

  1. github-code-quality[бот] findings: Code Quality uses CodeQL to perform a rule-based scan of your changes. These findings are posted as comments by github-code-quality[бот] and include a suggested autofix. Findings are labeled by severity (Error, Warning, Note), and administrators can set quality gates to block merges based on the severity of these findings.

  2. Copilot findings: If your organization has Copilot licenses and AI features are enabled for your enterprise, Code Quality uses Обзор кода Copilot to identify quality issues that rules-based analysis may not detect. These findings are posted as comments by Copilot, and include a suggested autofix. See О обзоре кода GitHub Copilot.

Resolving a finding

  1. On GitHub, navigate to your open pull request.
  2. On the Files Changed tab, scroll to a comment left by github-code-quality[бот] or Copilot.
  3. Carefully review the comment and the suggested autofix for logic, security, and style.
  4. If you agree with the suggestion and you want to apply the fix, click Commit suggestion, or Add suggestion to batch.
  5. Alternatively, if the finding isn't relevant or actionable, you can dismiss the finding. For example, you might dismiss a finding that is in legacy code no longer maintained, is a known exception to your team's coding standards, or is a false positive that doesn't pose a real quality risk.
    • For comments left by github-code-quality[бот], click Dismiss finding.
    • For comments left by Copilot, click Resolve.

Delegating remediation work to Copilot

В качестве альтернативы, если у вас есть Copilot лицензия, вы можете поручить работу по восстановлению .Copilot облачный агент Прокомментируйте pull-request, @Copilot упоминая и запросы, которые Copilot исправляют выявленные проблемы.

Скриншот с PR-комментарием, в котором использовался облачный агент Copilot.

Copilot Отвечает на ваш комментарий эмодзи глазами (👀) с глазами, начинает сессию нового агента и открывает pull request с необходимыми исправлениями.

Вы можете отслеживать Copilot облачный агентработу :

  • В запросе на вытягивание сводка обновляется по мере выполнения работы.
  • Используя страницу агентов или журналы сеансов, см. AUTOTITLE.

Для вызова Copilotнужна Copilot облачный агент лицензия.
Зарегистрируйтесь Copilot

Next steps

Morty Proxy This is a proxified and sanitized view of the page, visit original site.