Skip to content

Add github-event-poller skill#238

Closed
tofarr wants to merge 2 commits into
mainfrom
skill/github-event-poller
Closed

Add github-event-poller skill#238
tofarr wants to merge 2 commits into
mainfrom
skill/github-event-poller

Conversation

@tofarr
Copy link
Copy Markdown
Contributor

@tofarr tofarr commented May 16, 2026

Summary

Adds a new keyword-triggered skill, github-event-poller, that streamlines creating an OpenHands automation which polls a GitHub repository on a cron schedule for new events (issues, PRs, releases, comments, push, etc.) and runs user-defined handler instructions against each event.

This complements (does not replace) the existing webhook-based source: github event trigger in openhands-automation. Polling fills the gap for repos where the user doesn't own webhook config — e.g. monitoring a third-party public repo.

Capability Webhook trigger (source: github) This skill (cron + REST polling)
Needs webhook access Yes (must own the repo / org or App install) No — any repo readable by your token
Latency Real-time As frequent as your cron (e.g. every 15 min)
Public-repo monitoring Hard (you don't own webhook config) Easy — just read public events
State / deduplication Handled by webhook delivery Lookback window (managed by this skill)

Design

  • Uses the prompt-preset endpoint only. No custom SDK / tarball code — follows the openhands-automation rule.
  • Auth strategy is decided at runtime in the sandbox: prefer any mcp__github* tools if a GitHub MCP server is configured for the user's account, else fall back to $GITHUB_TOKEN via curl. If neither is available the run fails fast with a clear error. This keeps the skill itself lightweight and lets users wire up either path later without rebuilding the automation.
  • Deduplication via a lookback window (defaults to 2 × cron interval) plus a soft handler-level dedup hint for write actions ("don't post a comment if one from the same actor already exists").
  • Activation via keyword triggers (poll github, watch github repo, monitor github repo, github polling, cron github, …) plus a commands/github-poller:create.md slash entry. No deprecated slash trigger in frontmatter.

Layout

skills/github-event-poller/
├── SKILL.md                                 decision flow + API recipe
├── commands/github-poller:create.md         slash-command entry point
├── references/runtime-prompt-template.md    per-tick prompt with MCP/token logic
└── scripts/create_poller.sh                 one-shot wrapper that POSTs /preset/prompt

Validation

End-to-end validated against OpenHands/OpenHands on a local automation stack:

  • POST /api/automation/v1/preset/prompt201 Created
  • Manual dispatch → run transitioned PENDING → RUNNING within ~10s.

Catalog regen: python scripts/sync_extensions.py --checkAll extensions in sync. ✓

Known limitation

The auto-generated README catalog does not list the slash command for this skill, because the catalog generator (_get_slash_commands in scripts/sync_extensions.py) only reads slash entries from SKILL.md triggers: frontmatter — which AGENTS.md says is deprecated. Skills that still surface slash commands in the catalog (iterate, github-pr-review) do so via the legacy mechanism. Happy to add a fallback to the catalog generator (scan commands/*.md) in a follow-up PR if that's desirable.

Marked as draft

Posting as a draft for review — feedback welcome on naming, keyword list breadth, and whether the commands/-only convention should also light up the catalog row.


This pull request was prepared by an AI agent (OpenHands) on behalf of @tofarr.

Adds a new keyword-triggered skill that streamlines creating an
OpenHands automation which polls a GitHub repository on a cron schedule
for new events (issues, PRs, releases, comments, push, etc.) and runs
user-defined handler instructions against each event.

Key design points:
- Complements (does not replace) the existing webhook-based
  'source: github' event trigger in 'openhands-automation'. Polling
  fills the gap for repos where the user doesn't own webhook config
  (e.g. monitoring a third-party public repo).
- Uses the prompt-preset endpoint only; no custom SDK / tarball code.
- Auth strategy is decided at runtime inside the sandbox: prefer any
  'mcp__github' tools if a GitHub MCP server is configured, else fall
  back to the GITHUB_TOKEN env var via curl. If neither is available
  the run fails fast with a clear error.
- Deduplication via a lookback window (defaults to 2x cron interval)
  with a soft handler-level dedup hint for write actions.
- Bundled one-shot wrapper at scripts/create_poller.sh that builds the
  prompt from references/runtime-prompt-template.md and POSTs to
  /api/automation/v1/preset/prompt.
- Activation via keyword triggers (poll/watch/monitor github repo,
  github polling, cron github, etc.) plus a commands/github-poller:create.md
  slash entry (modern convention; no deprecated slash trigger in frontmatter).

End-to-end validated against OpenHands/OpenHands on a local automation
stack: preset POST -> 201, manual dispatch -> run transitioned
PENDING -> RUNNING.

README catalog and marketplace JSON regenerated via
scripts/sync_extensions.py.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr closed this May 22, 2026
@tofarr tofarr deleted the skill/github-event-poller branch May 22, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants