GitHub PR Hide Commits

Hide commit and timeline noise in GitHub PRs

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

Advertisement:

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

Advertisement:

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         GitHub PR Hide Commits
// @version      2026-06-10.1
// @description  Hide commit and timeline noise in GitHub PRs
// @match        https://github.com/*/*/pull/*
// @source       https://github.com/orgs/community/discussions/12985
// @license      MIT
// @namespace https://greasyfork.org/users/1611379
// ==/UserScript==

(function () {
    'use strict';

    const style = document.createElement('style');
    style.id = 'timeline-css';

    style.textContent = `
        /* Hide commit-related timeline events (GitHub internal event IDs) */
        .js-timeline-item[data-gid^="C_"],
        .js-timeline-item[data-gid^="CRE_"],
        .js-timeline-item[data-gid^="RRE_"],
        .js-timeline-item[data-gid^="RDE_"],
        .js-timeline-item[data-gid^="CTDE_"],
        .js-timeline-item[data-gid^="DEE_"],
        .js-timeline-item[data-gid^="DEME_"],
        .js-timeline-item[data-gid^="LE_"],
        .js-timeline-item[data-gid^="MIE_"] {
            display: none !important;
        }

        /* Hide commit push entries via URL pattern */
        .js-timeline-item:has(a[href*="/commit/"]) {
            display: none !important;
        }

        /* Hide "force pushed" noise */
        .js-timeline-item:has(svg[aria-label*="force"]) {
            display: none !important;
        }
    `;

    document.head.appendChild(style);
})();