Skip to content

Instantly share code, notes, and snippets.

@westonruter
Created September 12, 2025 18:00
Show Gist options
  • Save westonruter/5f8711c6566f8aef7a441c7eaf316d5f to your computer and use it in GitHub Desktop.
Save westonruter/5f8711c6566f8aef7a441c7eaf316d5f to your computer and use it in GitHub Desktop.
Helper script to run from bookmarklet to get list of users to potentially prop in order of potential impact in a ticket
const authorContribCount = {};
Array.from(document.querySelectorAll('.trac-author')).forEach(
(link) => {
if ( ! ( link.textContent in authorContribCount ) ) {
authorContribCount[ link.textContent ] = 0;
}
authorContribCount[ link.textContent ]++;
}
);
const entries = Object.entries( authorContribCount );
entries.sort( ( a, b ) => {
return b[1] - a[1];
} );
console.log( entries.map( ([tracUsername]) => tracUsername ).join( ', ' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment