Skip to content

Commit 44bde7f

Browse files
committed
Base number of commits off of the branch on origin
1 parent 5328bda commit 44bde7f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

action/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/versioning.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ export default class Versioning {
199199
* Note: HEAD should not be used, as it may be detached, resulting in an additional count.
200200
*/
201201
static async getTotalNumberOfCommits() {
202-
const numberOfCommitsAsString = await System.run('git', ['rev-list', '--count', this.branch]);
202+
const numberOfCommitsAsString = await System.run('git', [
203+
'rev-list',
204+
'--count',
205+
`origin/${this.branch}`,
206+
]);
203207

204208
return Number.parseInt(numberOfCommitsAsString, 10);
205209
}

0 commit comments

Comments
 (0)