Skip to content

Commit 4d6a6db

Browse files
committed
get-webhook-event-payload: error with a non-zero code upon exceptions
When exceptions are thrown, the exit code should not be 0. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 2627695 commit 4d6a6db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

get-webhook-event-payload.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,7 @@
144144
const fullEvent = await gitHubRequestAsApp(console, 'GET', `/app/hook/deliveries/${e.id}`)
145145
console.log(`id: ${e.id}\naction: ${e.action}\nevent: ${JSON.stringify(fullEvent, null, 2)}`)
146146
}
147-
})().catch(console.log)
147+
})().catch(e => {
148+
console.error(e)
149+
process.exitCode = 1
150+
})

0 commit comments

Comments
 (0)