Add github-event-poller skill#238
Closed
tofarr wants to merge 2 commits into
Closed
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: githubevent trigger inopenhands-automation. Polling fills the gap for repos where the user doesn't own webhook config — e.g. monitoring a third-party public repo.source: github)Design
openhands-automationrule.mcp__github*tools if a GitHub MCP server is configured for the user's account, else fall back to$GITHUB_TOKENvia 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.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").poll github,watch github repo,monitor github repo,github polling,cron github, …) plus acommands/github-poller:create.mdslash entry. No deprecated slash trigger in frontmatter.Layout
Validation
End-to-end validated against
OpenHands/OpenHandson a local automation stack:POST /api/automation/v1/preset/prompt→ 201 CreatedCatalog regen:
python scripts/sync_extensions.py --check→All 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_commandsinscripts/sync_extensions.py) only reads slash entries from SKILL.mdtriggers: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 (scancommands/*.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.