Created
January 6, 2016 13:07
-
-
Save gladimdim/374138e8f9a199abb40d to your computer and use it in GitHub Desktop.
Total lines sum calculator for bitbucket pull request
This file contains 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
(function() { | |
var sumLines = (arr) => arr.reduce((prev,curr) => { return prev + Number.parseInt(curr.innerText)}, 0); | |
return { | |
'Pull request': $.find(".pull-request-title a")[0].text, | |
'Added': sumLines($.find(".lines-added")), | |
'Removed': sumLines($.find(".lines-removed")) | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment