---
name: "Test Reviewer on PR (command)"
description: >-
  Re-reviews the new and modified test methods of a pull request when a
  maintainer comments `/review-tests`. Reviews correctness, effectiveness,
  reliability, maintainability, and repository conventions; posts a compact
  scorecard plus complete, apply-ready inline suggestions.

# The automatic on-open / on-synchronize variant lives in
# `test-reviewer-on-pr.agent.md`. They must remain separate workflows
# because mixing `slash_command` with other triggers makes gh-aw's
# activation gate always require a command position match, silently
# skipping the agent on every non-comment event.
on:
  slash_command:
    name: review-tests
    events: [pull_request_comment]
    strategy: centralized
  roles: [admin, maintainer, write]
  reaction: "eyes"

permissions:
  contents: read
  pull-requests: read
  copilot-requests: write

imports:
  - shared/test-reviewer-shared.md

safe-outputs:
  messages:
    footer: "> 🤖 **Automated content by GitHub Copilot.** Generated by the [{workflow_name}]({agentic_workflow_url}) workflow.{ai_credits_suffix} · [◷]({history_link})"
  noop:
    report-as-issue: false

concurrency:
  group: test-reviewer-${{ github.event.issue.number }}
  cancel-in-progress: true

timeout-minutes: 20
---

<!-- Body provided by shared/test-reviewer-shared.md -->
