mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-31 00:19:45 +08:00
wip
This commit is contained in:
+1
-13
@@ -33,12 +33,6 @@ async function run() {
|
||||
throw new Error('A url is required to run this action.')
|
||||
}
|
||||
|
||||
// initial info
|
||||
core.info(`Sending webhook request to ${url}`)
|
||||
|
||||
// debug start
|
||||
core.debug(new Date().toTimeString()) // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true
|
||||
|
||||
// make the request
|
||||
http
|
||||
.make(url, headers, body, insecure)
|
||||
@@ -50,12 +44,6 @@ async function run() {
|
||||
return
|
||||
}
|
||||
|
||||
// report on the status code
|
||||
core.info(`Received status code: ${res.status}`)
|
||||
|
||||
// debug end
|
||||
core.info(new Date().toTimeString())
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
error(err.status)
|
||||
@@ -70,4 +58,4 @@ function error(statusCode) {
|
||||
throw new Error(`Request failed with status code: ${statusCode}`)
|
||||
}
|
||||
|
||||
run()
|
||||
run()
|
||||
Reference in New Issue
Block a user