Skip to content

docs: fix github webhook example fields#1119

Open
zerone0x wants to merge 1 commit into
kelos-dev:mainfrom
zerone0x:fix-1118-github-webhook-example
Open

docs: fix github webhook example fields#1119
zerone0x wants to merge 1 commit into
kelos-dev:mainfrom
zerone0x:fix-1118-github-webhook-example

Conversation

@zerone0x

@zerone0x zerone0x commented May 9, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind docs

What this PR does / why we need it:

Fixes the GitHub webhook TaskSpawner example so new users do not copy invalid or deprecated fields:

  • changes the example Workspace spec.repo from object form to the string schema used by the API
  • replaces deprecated bodyContains usage with bodyPattern in example 10 and the integration docs filtering list

Which issue(s) this PR is related to:

Fixes #1118

Special notes for your reviewer:

Orbit assessment: simple -> hunter. This is a docs/example-only fix.

Validation run:

  • git diff --check
  • Python YAML sanity check for examples/10-taskspawner-github-webhook/taskspawner.yaml
  • grep check that bodyContains no longer appears in the issue target files

Does this PR introduce a user-facing change?

NONE

Summary by cubic

Fix GitHub webhook TaskSpawner docs/example to the current schema. Replace bodyContains with bodyPattern, use string spec.repo, and update comment to say “matching”.

Written for commit 574e2a0. Summary will update on new commits. Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@greptile-apps

greptile-apps Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This docs-only PR fixes two incorrect fields in the GitHub webhook TaskSpawner example and the integration guide: it replaces the deprecated bodyContains filter field with bodyPattern, and corrects the Workspace spec.repo definition from an invalid nested-object form to the string value the API actually accepts.

  • bodyContainsbodyPattern in docs/integration.md (inline example + filtering-options list) and examples/10-taskspawner-github-webhook/taskspawner.yaml — confirmed against the api/v1alpha1/taskspawner_types.go deprecation notice.
  • spec.repo string schema in the example Workspace object — confirmed against WorkspaceSpec.Repo string in workspace_types.go; secretRef comment indentation is also corrected to reflect that it is a sibling field of repo at the spec level, not a child of it.

Confidence Score: 5/5

Documentation-only changes that bring examples into alignment with the actual API schema; no code paths are affected.

Both changed fields (bodyPattern and the string form of spec.repo) are verified correct against the Go type definitions. The only remaining item is the deprecated bodyContains still present in self-development/ configs, which are internal and don't affect users.

No files require special attention. self-development/ configs still use the deprecated bodyContains but that is a follow-up concern outside this PR's scope.

Important Files Changed

Filename Overview
docs/integration.md Replaces deprecated bodyContains with bodyPattern in the GitHub Webhook YAML example and in the filtering options prose description; both changes align with the API type definition.
examples/10-taskspawner-github-webhook/taskspawner.yaml Fixes two issues: replaces deprecated bodyContains with bodyPattern in the issue-comment filter, and corrects the Workspace spec.repo field from an invalid object form to the string schema the API actually requires.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[GitHub Webhook Event] --> B{githubWebhook filter}
    B -->|event: issue_comment\naction: created\nbodyPattern: /kelos| C[Filter matches]
    B -->|no match| D[Event ignored]
    C --> E[TaskSpawner creates Task]
    E --> F[Agent Pod runs]
    F --> G[Workspace cloned\nspec.repo: string URL]
    G --> H[Optional secretRef\nat spec level]
Loading

Comments Outside Diff (1)

  1. self-development/kelos-workers.yaml, line 48 (link)

    P2 Deprecated bodyContains still present in self-development configs

    This PR removes bodyContains from the user-facing example and integration docs, but the self-development directory still uses bodyContains extensively — kelos-workers.yaml, kelos-squash-commits.yaml, kelos-reviewer.yaml, kelos-pr-responder.yaml, kelos-planner.yaml, kelos-api-reviewer.yaml, and self-development/README.md all reference it. While the deprecated field continues to work today, leaving these files out of sync with the current docs can confuse contributors who use the self-development configs as secondary examples and then compare them against integration.md.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: self-development/kelos-workers.yaml
    Line: 48
    
    Comment:
    **Deprecated `bodyContains` still present in self-development configs**
    
    This PR removes `bodyContains` from the user-facing example and integration docs, but the self-development directory still uses `bodyContains` extensively — `kelos-workers.yaml`, `kelos-squash-commits.yaml`, `kelos-reviewer.yaml`, `kelos-pr-responder.yaml`, `kelos-planner.yaml`, `kelos-api-reviewer.yaml`, and `self-development/README.md` all reference it. While the deprecated field continues to work today, leaving these files out of sync with the current docs can confuse contributors who use the self-development configs as secondary examples and then compare them against `integration.md`.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
self-development/kelos-workers.yaml:48
**Deprecated `bodyContains` still present in self-development configs**

This PR removes `bodyContains` from the user-facing example and integration docs, but the self-development directory still uses `bodyContains` extensively — `kelos-workers.yaml`, `kelos-squash-commits.yaml`, `kelos-reviewer.yaml`, `kelos-pr-responder.yaml`, `kelos-planner.yaml`, `kelos-api-reviewer.yaml`, and `self-development/README.md` all reference it. While the deprecated field continues to work today, leaving these files out of sync with the current docs can confuse contributors who use the self-development configs as secondary examples and then compare them against `integration.md`.

Reviews (1): Last reviewed commit: "docs: fix github webhook example fields" | Re-trigger Greptile

kelos-bot Bot pushed a commit that referenced this pull request May 11, 2026
The bodyContains filter field is deprecated in favour of bodyPattern,
which supports the same plain-text substring semantics for these
literal command strings while also enabling regex-based filters.

PR #1119 added the user-facing migration in docs/ and examples/ but
explicitly left self-development/ out of scope; the kelos-bot reviewer
flagged the remaining bodyContains uses as P2 outside-diff because the
self-development files are read by contributors as secondary examples.
This also exercises the "sweep self-development/ when deprecating
fields" convention added to AGENTS.md in the previous commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@zerone0x zerone0x force-pushed the fix-1118-github-webhook-example branch from f8d6e6e to 574e2a0 Compare May 22, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example 10 (github-webhook): two bugs — spec.repo.url invalid schema and deprecated bodyContains field

1 participant