From 270c3427f73bddf9a1a0dd8420332c16f6672f99 Mon Sep 17 00:00:00 2001 From: hyunnaye Date: Fri, 19 Apr 2024 13:26:24 -0400 Subject: [PATCH 1/2] fix date --- upsertGitHubTag/deployment/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upsertGitHubTag/deployment/index.js b/upsertGitHubTag/deployment/index.js index 459da09..2376c53 100644 --- a/upsertGitHubTag/deployment/index.js +++ b/upsertGitHubTag/deployment/index.js @@ -267,7 +267,7 @@ function logPayloadToS3(body, deliveryId) { // If bucket name is not null (had to put this for the integration test) if (process.env.BUCKET_NAME) { const uploadDate = new Date(); - const bucketPath = `${uploadDate.getFullYear()}-${uploadDate.getMonth()}-${uploadDate.getDay()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid + const bucketPath = `${uploadDate.getFullYear()}-${uploadDate.getMonth() + 1}-${uploadDate.getDate()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid const command = new PutObjectCommand({ Bucket: process.env.BUCKET_NAME, From a95b279d8b6c2caf64518290f6bf09e5c440d394 Mon Sep 17 00:00:00 2001 From: hyunnaye Date: Fri, 19 Apr 2024 13:30:41 -0400 Subject: [PATCH 2/2] eslint --- upsertGitHubTag/deployment/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upsertGitHubTag/deployment/index.js b/upsertGitHubTag/deployment/index.js index 2376c53..c91a281 100644 --- a/upsertGitHubTag/deployment/index.js +++ b/upsertGitHubTag/deployment/index.js @@ -267,7 +267,9 @@ function logPayloadToS3(body, deliveryId) { // If bucket name is not null (had to put this for the integration test) if (process.env.BUCKET_NAME) { const uploadDate = new Date(); - const bucketPath = `${uploadDate.getFullYear()}-${uploadDate.getMonth() + 1}-${uploadDate.getDate()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid + const bucketPath = `${uploadDate.getFullYear()} + -${uploadDate.getMonth() + 1} + -${uploadDate.getDate()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid const command = new PutObjectCommand({ Bucket: process.env.BUCKET_NAME,