From 561b34fc089434fbf5d0f2c9846d9c95232ed16c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:17:21 +0000 Subject: [PATCH 1/2] Initial plan From 8a90ab438fa890ed2868942ee2ba6fc3465cea63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:20:01 +0000 Subject: [PATCH 2/2] docs: add path-filtered pull_request trigger example to create-agentic-workflow.md Agent-Logs-Url: https://github.com/github/gh-aw/sessions/990f5f37-ddd7-4d82-abf4-307e41ef2ab5 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- .github/aw/create-agentic-workflow.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/aw/create-agentic-workflow.md b/.github/aw/create-agentic-workflow.md index 8b9b2327732..583d4333dae 100644 --- a/.github/aw/create-agentic-workflow.md +++ b/.github/aw/create-agentic-workflow.md @@ -800,6 +800,26 @@ Based on the parsed requirements, determine: 2. **Triggers**: Infer appropriate triggers from the description. **Always use `on:` as the YAML key** — never use `triggers:` (that is not a valid frontmatter key and will cause a compile error): - Issue automation → `on: issues: types: [opened, edited]` (add `workflow_dispatch:` manually if manual runs needed) - PR automation → `on: pull_request: types: [opened, synchronize]` (add `workflow_dispatch:` manually if manual runs needed) + - PR automation scoped to specific files → add `paths:` under `pull_request:` to trigger only when matching files change (ideal for backend/QA scenarios such as DB migration review or API contract checks): + ```yaml + on: + pull_request: + types: [opened, synchronize] + paths: + - 'db/migrations/*.sql' + - 'schema/**' + - 'src/api/**' + ``` + Use `paths-ignore:` instead when you want to trigger on *everything except* certain files (e.g., docs-only changes): + ```yaml + on: + pull_request: + types: [opened, synchronize] + paths-ignore: + - 'docs/**' + - '*.md' + ``` + **When to use path filters**: Use `paths:` when the workflow only makes sense for a specific subsystem (e.g., a DB schema reviewer that has no value on frontend-only changes). Use `paths-ignore:` when you want broad coverage but want to skip noise (e.g., documentation-only PRs). Omit both when the workflow should run on every PR regardless of which files changed. - Scheduled tasks → `on: schedule: daily on weekdays` (prefer weekdays to avoid Monday backlog - workflow_dispatch auto-added for fuzzy schedules only) - **On-demand commands** → use `slash_command` or `label_command` (see [Creating Command Workflows](#creating-command-workflows)): - `slash_command` → user types `/command-name` in a comment or body; flexible, works across issues/PRs/discussions