Skip to content

feat(add-github): polling mode, git access question, safe OneCLI secret merge#2301

Open
ira-at-work wants to merge 4 commits into
nanocoai:mainfrom
ira-at-work:fix/add-github-skill-polling-safe-onecli
Open

feat(add-github): polling mode, git access question, safe OneCLI secret merge#2301
ira-at-work wants to merge 4 commits into
nanocoai:mainfrom
ira-at-work:fix/add-github-skill-polling-safe-onecli

Conversation

@ira-at-work
Copy link
Copy Markdown

Summary

  • Polling mode (Mode B): adds a no-port-required GitHub integration that polls the REST API every 30s. The full adapter source is embedded in the skill so operators behind NAT/firewall can use GitHub without exposing an inbound port.
  • Webhook security warning: Mode A now presents a detailed risk list and explicit confirmation step before proceeding, with a recommendation to use polling if unsure.
  • Git/gh access question: before touching OneCLI the skill now asks whether the agent needs git/gh access (clone, push, gh pr create) or just comment read/write. Operators who only need comments skip the OneCLI section entirely, preventing the credential clobber described below.
  • Safe OneCLI secret merge (bug fix): onecli agents set-secrets replaces the entire secret list — the previous skill ran it with only the GitHub PAT IDs, silently removing the Anthropic API key from any agent that already had one. Replaced with a read-then-merge pattern: read current list → combine → deduplicate → set.

Test plan

  • Run /add-github on a fresh install — verify polling mode works end-to-end (comment on an issue, agent replies)
  • Run /add-github on an agent that already has an Anthropic API key in OneCLI — verify the key is still present after choosing git access
  • Run /add-github and choose "comments only" — verify OneCLI is not touched at all
  • Run /add-github and choose webhook — verify security warning is shown and confirmation is required

🤖 Generated with Claude Code

Ira Abramov and others added 3 commits May 18, 2026 14:30
…CLI secret merge

- Add Mode B (polling): no inbound port required, polls GitHub REST API
  every 30s. Includes the full polling adapter source embedded in the skill
  so operators without an exposed port can still use GitHub integration.
- Add webhook security warning before Mode A proceeds, with explicit
  user confirmation step and recommendation to switch to polling.
- Add git/gh access question (AskUserQuestion) before touching OneCLI:
  operators who only need issue/PR comments skip the section entirely,
  preventing accidental credential clobber.
- Fix OneCLI secret assignment: replace bare `set-secrets` (which
  overwrites the full list) with a read-then-merge pattern that preserves
  existing secrets (e.g. the Anthropic API key) when adding GitHub PATs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, fix sender field and timestamp

Three bugs discovered during live testing and fixed in the inline adapter code:

- adapter sent `author:` (plain string) instead of `sender:` in message content,
  causing the sender resolver to return null, and senderScopeGate to block every
  inbound comment even when isMention=true
- ISO string watermark comparison bug: '...10Z' > '...10.001Z' is true in JS
  because 'Z' > '.' in ASCII, so poll state never advanced; fixed with numeric
  Date.getTime() comparison and 1s advance instead of 1ms
- isMention was only set for @-mention text; added fetchTriggerIssues() so the
  bot also auto-engages on issues/PRs it opened, is assigned to, or was requested
  to review

Wiring section: added sender_scope='all' (required — GitHub commenters are not
registered users, without this the router drops all inbound comments), changed
engage_mode to 'mention-sticky' (follow-up comments in active threads work without
re-mention), and added a Multi-channel agent groups section documenting the
agent_destinations requirement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ira-at-work ira-at-work force-pushed the fix/add-github-skill-polling-safe-onecli branch from 94175e7 to cae14a9 Compare May 18, 2026 11:31
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.

1 participant