Skip to content

Add GitHub PR comment trigger workflow for self-hosted k8s workers (REMOTE-2003)#89

Draft
seemeroland wants to merge 1 commit into
mainfrom
oz-agent/REMOTE-2003
Draft

Add GitHub PR comment trigger workflow for self-hosted k8s workers (REMOTE-2003)#89
seemeroland wants to merge 1 commit into
mainfrom
oz-agent/REMOTE-2003

Conversation

@seemeroland

Copy link
Copy Markdown
Contributor

Summary

Adds a GitHub PR comment trigger workflow for self-hosted Kubernetes workers (REMOTE-2003).

Problem: Enterprise customers running self-hosted Oz workers on Kubernetes (e.g. via the Helm chart) had no documented path to trigger Oz from GitHub PR comments (@oz-agent mentions). The existing respond-to-comment.yml in oz-agent-action routes tasks to Warp cloud agents, not to customer-managed k8s workers.

Solution: A new consumer workflow template that calls the Warp REST API directly with config.worker_host targeting the customer's k8s worker ID, so PR-comment-triggered tasks run entirely within the customer's cluster.

Changes

consumer-workflows/gh-pr-comment.yml (new)

GitHub Actions workflow template that customers copy into .github/workflows/. When a PR comment containing @oz-agent is detected:

  1. Acknowledges with a 👀 reaction
  2. Resolves PR context (number, branch, changed files)
  3. Calls POST https://app.warp.dev/api/v1/agent/runs with config.worker_host set to the customer's OZ_WORKER_ID variable
  4. Posts a reply with a link to the run so the developer can track progress
  5. Reports any dispatch failure back to the commenter

The workflow runs on GitHub-hosted runners; no oz CLI is needed on the runner — only curl, jq, and the gh CLI. The Oz agent runs inside the customer's k8s cluster, checks out the PR branch, makes changes, commits, pushes, and replies.

README.md

New GitHub PR Integration section covering:

  • End-to-end flow diagram
  • Step-by-step setup (k8s GitHub credentials, workflow copy, secrets/variables)
  • Comparison table vs. oz-agent-action respond-to-comment.yml
  • Self-hosted GitHub Actions runner instructions
  • Prompt customization guidance

Design decisions

  • API call instead of oz CLI: The trigger step is just a lightweight API call, making the workflow runner-agnostic. No Debian/Ubuntu dependency from dpkg -i.
  • Fire-and-forget async model: Unlike the synchronous oz-agent-action approach, the workflow dispatches the run and returns. Oz handles pushing commits and posting the summary reply as part of the task.
  • config.worker_host routing: Uses the Warp API's worker_host field in the task config to route to the specific self-hosted worker, rather than requiring a Warp environment to be configured.
  • GitHub credentials via Kubernetes Secrets: Documented injection via kubernetesBackend.podTemplate.containers[task].env[GITHUB_TOKEN] or SSH key volume mounts.

Conversation: https://staging.warp.dev/conversation/325ab22d-8473-4aef-8ce4-221340cf2d05
Run: https://oz.staging.warp.dev/runs/019ef64d-601d-7ad8-91e0-717fde30252f
This PR was generated with Oz.

Adds consumer-workflows/gh-pr-comment.yml — a GitHub Actions workflow
template that enables the @oz-agent comment trigger pattern for teams
running self-hosted Kubernetes workers.

Unlike oz-agent-action's respond-to-comment.yml (which runs oz on
GitHub-hosted runners using Warp cloud agents), this workflow calls the
Warp REST API directly with config.worker_host targeting the customer's
self-hosted worker ID. The Oz agent then runs inside the customer's k8s
cluster, checks out the PR branch, makes the requested changes, commits,
and replies to the original comment.

Key properties:
- No oz CLI installation required on the GitHub runner (curl only)
- Works on GitHub-hosted runners OR self-hosted runners (any Linux)
- Worker routing via config.worker_host in the Warp API request
- GitHub credentials injected into task pods via kubernetesBackend.podTemplate

Also adds a 'GitHub PR Integration' section to README.md documenting:
- How the trigger flow works end-to-end
- K8s worker GitHub credential setup (GITHUB_TOKEN or SSH key)
- Comparison table vs. oz-agent-action approach
- Customization guidance for prompts and skills

Resolves REMOTE-2003.

Co-Authored-By: Oz <oz-agent@warp.dev>
@seemeroland seemeroland added the from-feedback-bot Linear issue delegated from Feedback Bot label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from-feedback-bot Linear issue delegated from Feedback Bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant