Skip to content

2.105.0-preview

Pre-release
Pre-release

Choose a tag to compare

@devlooped-bot devlooped-bot released this 22 Nov 00:35

What's Changed

Subscribe to GitHub Event Streams with gh event (preview)

The new gh event command set lets agents, integrations, and scripts wait for pull request changes instead of polling GitHub:

# Wait for a review event
gh event listen --resource https://github.com/OWNER/REPO/pull/NUMBER --event com.github.pull_request.review.submitted.v1 --timeout 30m

# Wait for a check suite completion event
gh event listen --resource https://github.com/OWNER/REPO/pull/NUMBER --event com.github.pull_request.check_suite.status.changed.v1 --jq .data.conclusion

# List active event subscriptions
gh event subscription list

By default, gh event listen exits after the first event. Use --count to wait for several events or --follow to keep listening. Events are printed as CloudEvent JSON objects, with data.api_url pointing to the resource that changed.

Supported events include submitted reviews, pull request state and head changes, merge conflicts, and completed check suites. The subscription create, list, view, and delete commands manage subscriptions directly.

Note

GitHub Event Streams is in preview. Join the wait list, read the announcement, or see the Event Streams documentation.

What's Changed

✨ Features

  • Add a server-sent events reader and Event Subscriptions API client by @babakks in #15071
  • Add gh event listen to wait for pull request events without polling by @babakks in #15072
  • Add gh event subscription list by @babakks in #15073
  • Add gh event subscription create by @babakks in #15074
  • Add gh event subscription view by @babakks in #15075
  • Add gh event subscription delete by @babakks in #15076
  • Suggest gh event listen to agents using gh pr and gh api by @babakks in #15077
  • Support check suite events and suggest them from gh run view and gh run watch by @babakks in #15081

🐛 Fixes

  • fix(event listen): print each event without waiting for the next heartbeat by @babakks and @iancanderson in #15079
  • fix(event listen): report deleted subscriptions clearly by @babakks in #15080
  • fix(event): improve stream framing, Retry-After handling, evals, and regression coverage by @babakks in #15083

📚 Docs & Chores

  • Make issue-triage formatting checks nonblocking by @BagToad in #15052
  • Add event-driven agent evals, gh skill guidance, and preview documentation by @babakks in #15078

:dependabot: Dependencies

Full Changelog: cli/cli@v2.104.0...v2.105.0

https://github.com/cli/cli/releases/tag/v2.105.0