GitHub CLI Introduces Event Streaming for Pull Request Updates

Original announcement: GitHub · 2026-11-19. Read the official announcement.

Summary of the New GitHub CLI Event Streaming Feature

GitHub announced that starting with gh CLI version 2.105.0, it supports GitHub Event Streams, enabling users to listen for pull request events directly. This allows developers and automation agents to wait for changes in pull requests through a streamlined command rather than repeatedly polling for updates.

What Has Changed?

  • Single-command event listening: Using gh event listen with a pull request URL and specified event types, you can subscribe to live events like review submissions or merge conflicts.
  • Event output: Each event is output as a line of JSON for easy machine parsing.
  • Flexible control: Options like --count wait for multiple events, --follow keeps listening indefinitely, and --timeout limits wait time.
  • Data extraction: Use --jq or --template to extract necessary JSON fields efficiently.
  • Subscription management: New commands gh event subscription create|list|view|delete let users manage event subscriptions directly.
  • Agent integration: Automation agents using commands like gh pr create or gh run watch will automatically recommend using event listening instead of polling.

Who Should Care?

This update is most relevant to:

  • Developers and teams automating workflows around pull requests, reviews, and CI checks who want more efficient event handling.
  • Automation agents and bots integrated with GitHub that currently rely on polling APIs to detect PR changes.
  • Developers using GitHub CLI for command-line GitHub interaction seeking streamlined, event-driven operations.

Next Steps for Developers

To take advantage of this new capability, developers should:

  1. Upgrade to gh CLI version 2.105.0 or higher.
  2. Sign up for access to the GitHub Event Streams preview if they have not already.
  3. Explore the gh event listen command to listen for relevant pull request events.
  4. Review and integrate --jq or --template options to parse event data according to their needs.
  5. Consider refactoring existing polling loops in scripts or agents to use this real-time event streaming approach.
  6. Monitor the gh event subscription commands for more granular subscription management.

Important Considerations

  • The gh event commands and Event Streams feature are currently in preview, which means the API and CLI behavior may change before general availability.
  • Access requires signing up for the Event Streams preview program on GitHub.com.

Checklist for Developers

  1. Verify your GitHub CLI version is 2.105.0 or later (gh --version).
  2. Sign up for Event Streams access via GitHub if needed.
  3. Test gh event listen on a pull request to understand output.
  4. Refactor any scripts or automation agents to replace polling with event listening.
  5. Provide feedback through GitHub Community discussions to assist with feature development.

Related Code Crushers coverage

Leave a Comment

Scroll to Top