Open patkub opened 6 years ago
gitHelpers.getNumberOfCommitsOnBranch does not work on CircleCI.
The refactoring of gitHelpers.getNumberOfCommitsOnBranch in https://github.com/greenkeeperio/greenkeeper-lockfile/pull/35 changed its output on CircleCI. Test: https://github.com/patkub/test-gk-lock-git-helpers/blob/master/index.js
gitHelpers.getNumberOfCommitsOnBranch
On a greenkeeper branch, both methods fail and return 0. CircleCI build: https://circleci.com/gh/patkub/test-gk-lock-git-helpers/35
Number of commits on branch: 0 Number of commits on branch (old method): 0
But, on the master branch, the old method properly detects the number of commits, while the new method returns 0. CircleCI build: https://circleci.com/gh/patkub/test-gk-lock-git-helpers/33
Number of commits on branch: 0 Number of commits on branch (old method): 15
The old method prior to https://github.com/greenkeeperio/greenkeeper-lockfile/pull/35 was https://github.com/greenkeeperio/greenkeeper-lockfile/blob/e2e41a735e623af3ba28267ae89cce982caeab80/lib/git-helpers.js#L6-L14
Current method is: https://github.com/greenkeeperio/greenkeeper-lockfile/blob/6a1068a50377bd4b444e7b00b3aab433b687bd52/lib/git-helpers.js#L8-L16
@nevir Any thoughts on how to fix this for CircleCI and not potentially break other CIs?
gitHelpers.getNumberOfCommitsOnBranch does not work on CircleCI.
The refactoring of
gitHelpers.getNumberOfCommitsOnBranch
in https://github.com/greenkeeperio/greenkeeper-lockfile/pull/35 changed its output on CircleCI. Test: https://github.com/patkub/test-gk-lock-git-helpers/blob/master/index.jsOn a greenkeeper branch, both methods fail and return 0. CircleCI build: https://circleci.com/gh/patkub/test-gk-lock-git-helpers/35
But, on the master branch, the old method properly detects the number of commits, while the new method returns 0. CircleCI build: https://circleci.com/gh/patkub/test-gk-lock-git-helpers/33
The old method prior to https://github.com/greenkeeperio/greenkeeper-lockfile/pull/35 was https://github.com/greenkeeperio/greenkeeper-lockfile/blob/e2e41a735e623af3ba28267ae89cce982caeab80/lib/git-helpers.js#L6-L14
Current method is: https://github.com/greenkeeperio/greenkeeper-lockfile/blob/6a1068a50377bd4b444e7b00b3aab433b687bd52/lib/git-helpers.js#L8-L16