Skip to content

Commit 8d8381d

Browse files
committed
new helper function
1 parent ebbbcfc commit 8d8381d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

upsertGitHubTag/deployment/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ function processEvent(event, callback) {
170170
if (githubEventType === "installation_repositories") {
171171
// The installation_repositories event contains information about both additions and removals.
172172
console.log("Valid installation event");
173-
logPayloadToS3(deliveryId); //upload event to S3
173+
174+
logPayloadToS3(body, deliveryId); //upload event to S3
174175

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

211212
const repository = body.repository.full_name;
212213
const gitReference = body.ref;
@@ -262,7 +263,7 @@ function processEvent(event, callback) {
262263
}
263264
}
264265

265-
function logPayloadToS3(deliveryId) {
266+
function logPayloadToS3(body, deliveryId) {
266267
// If bucket name is not null (had to put this for the integration test)
267268
if (process.env.BUCKET_NAME) {
268269
const uploadDate = new Date();

0 commit comments

Comments
 (0)