Skip to content

Commit

Permalink
bugfix: use context ref directly if not pr
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhrao committed Jan 4, 2023
1 parent d9e0dc8 commit d326a34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9296,7 +9296,7 @@ exports.requiredEnvVars = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'GITHUB
exports.default = (bucketName, uploadDirectory, environmentPrefix) => __awaiter(void 0, void 0, void 0, function* () {
const websiteUrl = `https://s3.amazonaws.com/${bucketName}/index.html`;
const { repo } = github.context;
const branchName = github.context.payload.pull_request.head.ref;
const branchName = github.context.ref;
validateEnvVars_1.default(exports.requiredEnvVars);
const bucketExists = yield checkBucketExists_1.default(bucketName);
if (!bucketExists) {
Expand Down
2 changes: 1 addition & 1 deletion src/actions/uploadAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const requiredEnvVars = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'G
export default async (bucketName: string, uploadDirectory: string, environmentPrefix: string) => {
const websiteUrl = `https://s3.amazonaws.com/${bucketName}/index.html`
const { repo } = github.context
const branchName = github.context.payload.pull_request!.head.ref
const branchName = github.context.ref

validateEnvVars(requiredEnvVars)

Expand Down

0 comments on commit d326a34

Please sign in to comment.