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 για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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