Skip to content

Commit

Permalink
new helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunnaye committed Apr 18, 2024
1 parent ebbbcfc commit 8d8381d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upsertGitHubTag/deployment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ function processEvent(event, callback) {
if (githubEventType === "installation_repositories") {
// The installation_repositories event contains information about both additions and removals.
console.log("Valid installation event");
logPayloadToS3(deliveryId); //upload event to S3

logPayloadToS3(body, deliveryId); //upload event to S3

path += "workflows/github/install";
postEndpoint(path, body, deliveryId, (response) => {
Expand Down Expand Up @@ -206,7 +207,7 @@ function processEvent(event, callback) {
// A push has been made for some repository (ignore pushes that are deletes)
if (!body.deleted) {
console.log("Valid push event");
logPayloadToS3(deliveryId); //upload event to S3
logPayloadToS3(body, deliveryId); //upload event to S3

const repository = body.repository.full_name;
const gitReference = body.ref;
Expand Down Expand Up @@ -262,7 +263,7 @@ function processEvent(event, callback) {
}
}

function logPayloadToS3(deliveryId) {
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();
Expand Down

0 comments on commit 8d8381d

Please sign in to comment.