self-development: document modern webhook filter fields in README

Merged
KE
5mo ago
+18-0

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

self-development/README.md is the canonical reference for users
adapting these patterns to their own repositories, but the "Customizing
for Your Repository" section's only webhook-filter example showed just
three filter fields (bodyPattern, labels, state) — silently
omitting every modern field the shipped TaskSpawners actually depend on
for safe operation:

  • excludeAuthors (top-level under githubWebhook) — exclude the
    agent's own bot account so it cannot re-trigger itself.
  • commentOn — scope issue_comment events to Issue or
    PullRequest; GitHub fires the event for both.
  • author — the maintainer-approval gate every shipped spawner uses.
  • excludeBodyPatterns — companion to bodyPattern for regex
    exclusions (e.g. bot echoes).
  • draft — skip draft PRs.

A reader copying the prior example verbatim ended up with no maintainer
gate (any GitHub user could fan out an Opus task on their repo), no
self-trigger exclusion, and no event-scope discrimination.

This PR extends the YAML snippet with excludeAuthors, commentOn,
and author (matching the shape used in kelos-workers.yaml and
kelos-pr-responder.yaml), adds a small field-purpose table covering
all six fields, and links to docs/reference.md#taskspawner as the
canonical reference. No code changes — README only.

Verification:

  • grep -c bodyContains self-development/README.md → 0
  • grep -E 'bodyPattern|commentOn|excludeAuthors|author:|draft:' self-development/README.md | wc -l → 8

Which issue(s) this PR is related to:

Fixes #1131

Special notes for your reviewer:

draft is described in the prose table but deliberately not added to
the example YAML, because the example uses commentOn: Issue /
events: [issue_comment] where draft has no effect — including it
under those settings would be misleading. The table tells readers when
it does apply (PR events).

Does this PR introduce a user-facing change?

NONE

Summary by cubic

Document modern webhook filter fields in self-development/README and update the example to match shipped TaskSpawners. Adds excludeAuthors, commentOn, and author; documents bodyPattern (modern regex matcher), excludeBodyPatterns, and draft in a small field table; and links to the full TaskSpawner reference (fixes #1131).