Skip to content

Suggested test: copilot/add-comment-mentions-allowed #4246

Description

@github-actions

Motivation

Link to the gh-aw PR: github/gh-aw#41756 — feat(mattpocock-reviewer): mention @copilot in review comments

This PR introduced mentions: allowed: ["@copilot"] as a safe-outputs configuration block that explicitly authorises @copilot mentions in comment bodies. Without this config, the safe-outputs server blocks comment bodies containing @copilot. No E2E test exercises this new safe-outputs config field.

Proposed test

  • Workflow file: test-copilot-add-comment-mentions-allowed.md
  • Trigger: workflow_dispatch
  • Engine: copilot
  • Safe output: add-comment
  • Variant: standard

Minimal test prompt sketch

Configure safe-outputs.add-comment with mentions: allowed: ["@copilot"]. Prompt the agent to add a comment to a fixture issue that includes "@copilot please review." in the body. The test verifies that the comment is posted successfully — a failure here would mean the safe-outputs server rejected the @copilot mention, indicating a regression in the mentions: allowed enforcement path.

New fixtures or secrets needed

None. Uses the existing githubnext/gh-aw-test repository and any open issue as the comment target.

Notes

  • Existing test-copilot-add-comment.md tests the standard comment path without @mentions.
  • The key open question is the exact YAML schema for mentions: allowed: in the safe-outputs block — confirm whether the structure is add-comment: { mentions: { allowed: ["@copilot"] } } before writing the .md source.
  • A samples: block can be provided: body: "This looks good! @copilot please review.".
  • If mentions: allowed also needs to be tested for other comment types (add-discussion-comment, create-pull-request-review-comment), those can be follow-on tests; this issue covers the minimal add-comment case.

Generated by 🔍 Suggest New E2E Tests · 57 AIC · ⌖ 7.31 AIC · ⊞ 5.9K ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions