Closed pcambra closed 9 years ago
I'm not sure if I understand this code but it looks like:
%x[#{git_command}].split("\n").each do |c|
if c.index('Revert') == 0 then
reverts.push(c.scan(/#([0-9]+)/))
else
commits.push(c)
end
end
If it finds a reverted commit then it never counts that commit, so later it removes the reverted commit from the count.
Finally was able to install and run it.
The commit is never added to the array when there's a Revert.
if c.index('Revert') == 0 then
reverts.push(c.scan(/#([0-9]+)/))
else
commits.push(c)
end
And then is removed later
if r = reverts.index{ |item| item == issue_number }
commits.delete_at(i)
reverts.delete_at(r)
end
So that's right :), it is not counted twice.
The flow is normally:
Bunch of work Commit https://www.youtube.com/watch?v=1EBfxjSFAxQ Revert Bunch of work Commit
When it finally goes in, it should be counted as 1 and now I think it's counted as 2.