Last active
July 24, 2020 15:19
-
-
Save Ruffo324/71617a92e3907fd15d9a04dabc189bf3 to your computer and use it in GitHub Desktop.
Views the total added lines in the gitlab merge-review page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open the Merge-Review, navigate to the "Changes (x)" tab, and paste the following code into the developer console. | |
var totalRemoved = 0; | |
var totalAdded = 0; | |
for(var i = 0; i < $(".file-row-stats > .cgreen").length; i++) | |
{ | |
totalAdded += parseInt($(".file-row-stats > .cgreen")[i].innerText); | |
totalRemoved += parseInt($(".file-row-stats > .cred")[i].innerText); | |
} | |
console.log(`Added: \t\t${totalAdded}\nRemoved: \t${totalRemoved}\nTotal: \t\t${totalAdded + totalRemoved}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment