elastic / elastic/ai-github-actions

[product-manager-impersonator] Path-filter hints for PR workflows

Open
#1,471 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Feature Idea

**Summary:** Add commented `paths` / `paths-ignore` examples to PR-trigger workflow templates so monorepo teams can scope noisy first installs to relevant files.

## Why a Customer Would Want This
Teams adopting these workflows in large monorepos may not want every PR review, dependency update review, or PR-body refresh to run for every file change on day one. The current getting-started flow encourages copying examples directly, so a small commented hint would help customers tailor trigger volume without learning GitHub Actions event filters from scratch.

## Rough Implementation Sketch
- Add commented `paths` / `paths-ignore` snippets under the `pull_request` trigger in PR-oriented examples such as `gh-agent-workflows/pr-review/example.yml`, `gh-agent-workflows/dependency-review/example.yml`, and `gh-agent-workflows/update-pr-body/example.yml`.
- Add a short note in the GH Agent Workflows setup docs that trigger-level filters are a good first customization for monorepos.
- Keep the default behavior unchanged by leaving the snippets commented out.

## Why It Won't Be That Hard
This is a docs/template-only change with no compiler or runtime behavior changes. The examples are copied as plain YAML starters, so adding commented trigger hints follows the existing customization pattern while preserving today’s defaults.

## Evidence
- `docs/index.md:13-27` tells users to copy the core workflow examples directly, including `pr-review`, and `docs/index.md:31-33` positions PR review/CI diagnosis as part of the default install.
- `docs/workflows/gh-agent-workflows.md:5-8` says consumers copy each workflow's `example.yml` and customize it, but the setup snippet only shows trigger type and workflow call at `docs/workflows/gh-agent-workflows.md:9-18`.
- `gh-agent-workflows/pr-review/example.yml:2-4`, `gh-agent-workflows/dependency-review/example.yml:2-4`, and `gh-agent-workflows/update-pr-body/example.yml:2-4` all trigger on broad `pull_request` activity without any commented path-filter guidance.
- Duplicate checks found no Product Manager Impersonator issue for `path-filter`, `paths-ignore`, or monorepo path-filter hints. A broader search surfaced a separate Framework Best Practices report about internal CI test workflow path filtering, which does not cover customer-facing PR workflow template hints.

## Suggested Actions
- [ ] Add commented path-filter examples to PR-oriented workflow templates.
- [ ] Document trigger-level path filters as an optional monorepo customization in the setup docs.
- [ ] Keep defaults unchanged so existing installs continue to run on all PR changes.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/28512886204)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.