Skip to content

Commit 9c75180

Browse files
committed
fix: avoid sending empty strings when the run is not from a PR
1 parent 9cac9bd commit 9c75180

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

dist/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.

dist/index.js.map

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

src/upload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {TypedResponse} from "@actions/http-client/lib/interfaces";
88

99
const getUploadMetadata = (): UploadMetadata => ({
1010
ref: context.ref,
11-
headRef: context.payload?.pull_request?.head?.ref ?? "",
12-
baseRef: context.payload?.pull_request?.base?.ref ?? "",
11+
headRef: context.payload?.pull_request?.head?.ref,
12+
baseRef: context.payload?.pull_request?.base?.ref,
1313
owner: context.repo.owner,
1414
repository: context.repo.repo,
1515
event: context.eventName,

0 commit comments

Comments
 (0)