Skip to content

Instantly share code, notes, and snippets.

@obedparla
Last active June 14, 2019 12:47
Show Gist options
  • Save obedparla/056ad8946e25af98ee04852433b5f0ad to your computer and use it in GitHub Desktop.
Save obedparla/056ad8946e25af98ee04852433b5f0ad to your computer and use it in GitHub Desktop.
Get the total amount of lines removed in a bitbucket pull request (PR)
// Paste this on the console in a bitbucket PR
const linesRemovedElements = document.getElementsByClassName('lines-removed')
let totalRemoved = 0;
for(ele of linesRemovedElements){
totalRemoved += Number(ele.innerText)
}
@obedparla
Copy link
Author

Update: this only works on the old version of Bitbucket. Most people have the new PR UI now so this is no longer valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment