跳到正文
DEV Community· Mango Developer·· 48 分鐘前AI 評分56

GitHub CLI v2.105.0 加入事件串流監聽,Copilot 團隊預設設定正式開放

GitHub CLI v2.105.0 Replaces Polling Loops With Event Streams and Team Copilot Defaults

AI 導讀

GitHub 於 2026-11-18 推出兩項工作流程更新:GitHub CLI v2.105.0 加入 gh event listen,透過 GitHub Event Streams 接收符合條件的 pull request 事件;團隊層級的 Copilot 自訂設定則向 Copilot Business 和 Copilot Enterprise 組織正式開放。

正文

Writing a CI script or an AI coding agent that waits on a pull request usually ends the same way: a while loop hammering gh pr view every 30 seconds until rate limits complain. On November 18, 2026, GitHub shipped two workflow updates that cut out both polling boilerplate and repetitive team onboarding setup.

The first update lands in GitHub CLI v2.105.0, adding gh event listen on top of GitHub Event Streams. The second update makes team-level Copilot customizations generally available for Copilot Business and Copilot Enterprise organizations.

How gh event listen ends pull request polling

With gh v2.105.0, developers and automated agents can pass a pull request URL and an event filter to gh event listen. The CLI creates an Event Streams subscription, holds open the stream, and prints each matching event as a single line of JSON.

By default, gh event listen exits right after receiving the first matching event. That behavior fits cleanly into shell pipelines, pre-merge automation, and autonomous coding loops where an agent opens a PR and waits for a review or check suite before taking its next step.

When a workflow needs to track multiple milestones, flags keep the command flexible:

  • Use --count to exit after a specific number of events arrive.
  • Pass --follow to keep streaming events indefinitely for live dashboards or daemon scripts.
  • Add --timeout to fail cleanly if a check suite stalls past your SLA window.
  • Pipe fields directly with --jq or --template without spawning an external JSON parser.

Supported triggers cover submitted pull request reviews, PR state and head commit changes, merge conflicts, and completed check suites. For long-lived tooling, gh event subscription create, list, view, and delete let scripts manage underlying stream subscriptions explicitly.

Built-in agent discovery inside existing gh commands

One of the cleverest details in gh v2.105.0 is how GitHub nudges AI coding agents to adopt the new command without manual prompt engineering. Standard commands that agents already run every day, including gh pr create, gh pr view, gh run view, gh run watch, and gh api, now output hints suggesting gh event listen when a wait loop is detected or implied.

That matters as more repositories pair CLI automation with AI assistants alongside modern build pipelines like Parcel 3 Alpha or frameworks such as Next.js 16.4.5. Fewer polling loops mean fewer wasted API calls, faster feedback when CI finishes, and cleaner bash wrappers.

There is one catch to check before rewriting your team's scripts today. Both gh event commands and GitHub Event Streams remain in preview on GitHub.com, so organizations must sign up for the Event Streams waitlist before subscriptions will activate.

GitHub Changelog header graphic highlighting November 2026 developer updates

Expand

GitHub Changelog header graphic highlighting November 2026 developer updates

Team-level Copilot plugins without policy conflicts

On the same day, GitHub solved a different onboarding headache for engineering leads. Previously, Copilot customization lived at two extremes: rigid organization-wide policies or every developer manually hunting down plugins in their own editor.

Now, team maintainers and organization owners can open any organization team on github.com, click the Customize Copilot tab, and pick approved Agent Plugins as team defaults. Maintainers can pull plugins from built-in Copilot marketplaces, enterprise marketplaces, or a custom plugin marketplace stored in a GitHub repository.

Capability GitHub CLI Event Streams (gh v2.105.0) Copilot Team Customizations
Release Status Preview (requires Event Streams waitlist) Generally Available (Business & Enterprise)
Primary Target CI scripts, bash automation, coding agents Direct members of an organization team
Supported Clients Terminal, CI runners, agent toolboxes VS Code, GitHub Copilot app, Copilot CLI
Core Control gh event listen & subscription commands Customize Copilot tab on team settings
Override Rules --count, --follow, --timeout, --jq Enterprise/org policies block disallowed plugins
Inheritance Per-PR URL or explicit subscription ID Direct team members only (no child teams)

Once enabled, team default plugins activate automatically for direct members across VS Code, the GitHub Copilot app, and Copilot CLI. Two boundaries keep governance clean: child teams do not inherit parent team defaults, and individual developers can still toggle off an optional team plugin locally if organization policy allows it.

Enterprise and organization-level rules always take precedence. If an admin blocks a marketplace or mandates a specific security plugin, team defaults cannot override those guardrails.

GitHub Changelog graphic for the pull request events release in GitHub CLI

Expand

GitHub Changelog graphic for the pull request events release in GitHub CLI

Image: GitHub Changelog.

What to update in your workflow this week

Engineering managers on Copilot Business or Enterprise can set up team plugin defaults right away. Start by auditing which Agent Plugins your backend, frontend, or platform teams actually install on day one, then add those to a team-scoped marketplace or select them from your enterprise catalog.

For CLI and agent workflows, upgrade local and CI runner images to gh v2.105.0 and request Event Streams preview access for a sandbox repository first. Keeping a fallback path for repositories without Event Streams enabled ensures your automation stays portable while the preview rolls out.

Practical migration examples for shell scripts and CI runners

Teams migrating existing bash automation to gh v2.105.0 can replace multi-line while sleep loops with a single blocking command. For example, a deployment script waiting for a release pull request to pass required checks and receive an approval can run gh event listen PR_URL --count 2 --timeout 30m --jq '.event + " " + .state' instead of polling the REST API every 15 seconds. Because the command exits with a non-zero status if --timeout expires, standard shell error handling (set -e) catches stalled builds without custom retry counters.

CI/CD maintainers should also look at how gh event subscription commands separate setup from consumption. Long-running self-hosted runners or internal developer portals can create a persistent subscription once using gh event subscription create, store the returned ID, and reconnect cleanly after container restarts without missing events in between. Combined with --template formatting, teams can pipe event payloads straight into Slack webhooks, issue trackers, or local notification daemons with zero extra dependencies beyond gh.

Keep an eye on enterprise audit logs as well. When maintainers roll out team-level Copilot defaults alongside gh event listen automation, security leads can verify both which plugins developers run locally and which automated checks trigger merges across protected branches without slowing down daily shipping.

Choosing between team defaults and org-wide rules

Platform teams rolling out Copilot team customizations should keep inheritance boundaries in mind. Because child teams do not inherit parent team plugins automatically, organizations with nested sub-teams need to assign defaults at the leaf team level where developers actually ship code. Pairing team-level defaults with organization-wide marketplace allowlists gives security teams predictable guardrails while letting frontend, backend, and infrastructure squads tune their own daily toolset.

Meanwhile, developers testing gh event listen in CI should monitor preview rate limits and subscription cleanup. Running gh event subscription delete in a shell trap block ensures temporary pull request listeners never accumulate orphaned subscriptions after aborted workflow runs.


Originally published on Mango Developer.

來源:DEV Community · dev.to