Skip to content

Commit 8d3552d

Browse files
committed
Can't default to GITHUB_REF_NAME during testing
1 parent f53462a commit 8d3552d

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

dist/index.js

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

dist/index.js.map

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

lib/providers/DefaultCurrentCommitResolver.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ class DefaultCurrentCommitResolver {
3131
}
3232
ResolveBranchNameAsync() {
3333
return __awaiter(this, void 0, void 0, function* () {
34-
const branchName = this.branch == 'HEAD' ?
35-
process.env.GITHUB_REF_NAME || (yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD'))
36-
: this.branch;
34+
const branchName = this.branch == 'HEAD' ? yield (0, CommandRunner_1.cmd)('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
3735
return branchName.trim();
3836
});
3937
}

src/providers/DefaultCurrentCommitResolver.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ export class DefaultCurrentCommitResolver implements CurrentCommitResolver {
2525

2626
public async ResolveBranchNameAsync(): Promise<string> {
2727
const branchName =
28-
this.branch == 'HEAD' ?
29-
process.env.GITHUB_REF_NAME || await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD')
30-
: this.branch;
28+
this.branch == 'HEAD' ? await cmd('git', 'rev-parse', '--abbrev-ref', 'HEAD') : this.branch;
3129

3230

3331
return branchName.trim();

0 commit comments

Comments
 (0)