Mergify Events

作者 mergifyioe7c1ebbc2813無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Use `mergify events` to browse the Mergify activity log — every event Mergify recorded for a repository or one pull request (queue enters/leaves, merges, commands, CI Insights, freezes), as a human timeline or JSON. ALWAYS use this skill when investigating what Mergify did to a PR or repository and when, reconstructing a pull request's merge-queue lifecycle, auditing Mergify actions, or filtering events by type. Triggers on activity log, event log, events, what did Mergify do, queue lifecycle, queue history, event timeline, event_type, action.queue.

僅含說明DevOps & Cloud
AI 產生的概覽

說明如何使用 mergify events 指令,以時間軸或 JSON 形式瀏覽儲存庫的 Mergify 活動記錄。

功能
此技能說明用來讀取儲存庫或單一提取要求之 Mergify 活動記錄的 mergify events 指令。內容涵蓋約 45 種記錄的事件類型、時間視窗規則與保留期限、如何閱讀人類可讀的時間軸,以及 JSON 輸出契約。它也指出何時應改用 mergify queue show 或原始記錄 API。
適用情境
適用於調查 Mergify 對某個提取要求或儲存庫做了什麼以及何時做的、重建提取要求的合併佇列生命週期、稽核 Mergify 動作,或依類型篩選事件。在解讀空結果或 checks_end 中止代碼時也適用。
執行需求
需要可存取儲存庫活動記錄的 Mergify CLI;不隨附指令碼,僅為說明文件。使用原始 API 需要權杖與網路存取。

Mergify Events

Overview

mergify events lists the repository's Mergify activity log as a timeline — the ~45 event types the engine records: the action.queue.* lifecycle, workflow actions (action.merge, action.rebase, action.label, …), user commands (command.queue, command.dequeue), ci_insights.*, queue pauses, and scheduled freezes. One command over filters; there is deliberately no command per event type.

bash
mergify events                                  # whole repo, last 24hmergify events --pr 1740                        # one PR's events, last 24hmergify events --pr 1740 --since 7d             # wider window (s/m/h/d/w, max 90d)mergify events --type action.queue.leave --type command.queue   # filter, repeatablemergify events --pr 1740 --json                 # raw events, newest firstmergify events --limit 20                       # newest 20 only (the header says so)

The window rule (the one thing to get right)

Every result covers an explicit time window, stated in the header and in the empty-case message:

PR #1740 · 6 events · 2026-07-29 21:00 → 2026-07-30 21:00 UTC
  • Default window: the last 24 hours. A PR dequeued last week shows nothing in the default window — that is "nothing in the last 24h", never "no history".
  • Retention is 90 days; --since 90d is the widest useful window. Anything wider is rejected up front with the fix in the message.
  • An empty result names the window: No events for PR #1740 between <from> and <to> UTC. If you did not search the full retention yet, widen with --since 90d before concluding anything.

Reading the timeline

Oldest first (it reads down the page), with a summary per event where the metadata carries one:

  2026-07-30  14:02  action.queue.enter         default  14:31  action.queue.checks_start  default · draft PR #1801  15:04  action.queue.checks_end    CHECKS_RETRIED  15:04  action.queue.leave         CHECKS_FAILED  15:12  command.queue              @jd

Caveat that prevents a real mistake: an abort code on action.queue.checks_end (PR_AHEAD_DEQUEUED, MERGE_QUEUE_RESET, CHECKS_RETRIED, …) means the checks were interrupted while the PR stayed queued. Only action.queue.leave means the PR left the queue — and its merged: true variant means it left by merging. Do not requeue a PR over a checks_end event.

JSON contract

--json emits one document; events are the API's raw objects (unknown fields intact), newest first:

json
{  "repository": "owner/repo",  "pull_request": 1740,  "received_from": "2026-07-29T21:00:00+00:00",  "received_to": "2026-07-30T21:00:00+00:00",  "size": 6,  "events": [ { "id": 123, "type": "action.queue.leave", "received_at": "…", "metadata": { "…": "…" } } ]}

The window is echoed so an empty events is self-describing. Filter with jq on .events[].type and .events[].metadata.

When to use something else

  • "Why was this PR dequeued?" — mergify queue show <PR> (the mergify-merge-queue skill) is the dedicated answer: it renders the last leave event with the reason, the failing checks' job URLs, and the head-SHA staleness check. mergify events is for the whole trail or for non-queue events.
  • Raw API access (CLI not installed, or a token refused the log): GET /v1/repos/{owner}/{repo}/logs — same data; always pass received_from (the API silently defaults to 1 day) and keep the span ≤ 93 days.

來源與署名

來源:mergifyio/mergify-cli位於skills/mergify-events提交e7c1ebb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架