mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-24 00:49:00 +08:00
Update logging for debug purposes
This commit is contained in:
+7
-2
@@ -8,14 +8,19 @@ async function run() {
|
||||
const body = core.getInput('body') ?? '';
|
||||
|
||||
// initial info
|
||||
core.info(`Sending webhook request to ${url}...`);
|
||||
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)
|
||||
.then((res) => core.setOutput('statusCode', res.status));
|
||||
.then((res) => {
|
||||
// output the status
|
||||
core.setOutput('statusCode', res.status);
|
||||
// report on the status code
|
||||
core.info(`Received status code: ${res.status}`);
|
||||
});
|
||||
|
||||
// debug end
|
||||
core.info((new Date()).toTimeString());
|
||||
|
||||
Reference in New Issue
Block a user