Skip to content

Commit

Permalink
Base number of commits off of the branch on origin
Browse files Browse the repository at this point in the history
  • Loading branch information
webbertakken committed May 2, 2020
1 parent 5328bda commit 44bde7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action/index.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/model/versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ export default class Versioning {
* Note: HEAD should not be used, as it may be detached, resulting in an additional count.
*/
static async getTotalNumberOfCommits() {
const numberOfCommitsAsString = await System.run('git', ['rev-list', '--count', this.branch]);
const numberOfCommitsAsString = await System.run('git', [
'rev-list',
'--count',
`origin/${this.branch}`,
]);

return Number.parseInt(numberOfCommitsAsString, 10);
}
Expand Down

0 comments on commit 44bde7f

Please sign in to comment.