From 92c49070dda6f48dfe461392e41a5e17189bc08e Mon Sep 17 00:00:00 2001 From: hyunnaye Date: Wed, 26 Jun 2024 11:09:31 -0400 Subject: [PATCH] add hour --- upsertGitHubTag/deployment/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upsertGitHubTag/deployment/index.js b/upsertGitHubTag/deployment/index.js index 144b103..027df9b 100644 --- a/upsertGitHubTag/deployment/index.js +++ b/upsertGitHubTag/deployment/index.js @@ -270,7 +270,8 @@ function logPayloadToS3(body, deliveryId) { const uploadYear = date.getFullYear(); const uploadMonth = (date.getMonth() + 1).toString().padStart(2, "0"); // ex. get 05 instead of 5 for May const uploadDate = date.getDate().toString().padStart(2, "0"); // ex. get 05 instead of 5 for the 5th date - const bucketPath = `${uploadYear}-${uploadMonth}-${uploadDate}/${deliveryId}`; + const uploadHour = date.getHours().toString().padStart(2, "0"); // ex. get 05 instead of 5 for the 5th hour + const bucketPath = `${uploadYear}-${uploadMonth}-${uploadDate}/${uploadHour}/${deliveryId}`; const command = new PutObjectCommand({ Bucket: process.env.BUCKET_NAME,