Skip to content

Commit

Permalink
fix: avoid sending empty strings when the run is not from a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 committed Nov 14, 2022
1 parent 9cac9bd commit 9c75180
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {TypedResponse} from "@actions/http-client/lib/interfaces";

const getUploadMetadata = (): UploadMetadata => ({
ref: context.ref,
headRef: context.payload?.pull_request?.head?.ref ?? "",
baseRef: context.payload?.pull_request?.base?.ref ?? "",
headRef: context.payload?.pull_request?.head?.ref,
baseRef: context.payload?.pull_request?.base?.ref,
owner: context.repo.owner,
repository: context.repo.repo,
event: context.eventName,
Expand Down

0 comments on commit 9c75180

Please sign in to comment.