GitHub PR Hide Commits

Hide commit and timeline noise in GitHub PRs

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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);
})();