chore: updating deps

This commit is contained in:
Joel Male
2024-03-28 12:25:32 +10:00
parent 0de33a6f62
commit c54aaa0ec6
779 changed files with 586281 additions and 1021521 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import fetch from 'node-fetch';
var https = require('https')
import fetch from 'node-fetch'
import https = require('https')
class Http {
make(
@@ -8,7 +8,7 @@ class Http {
headers: string | null = null,
ignoreCertificate: boolean | null = false
): Promise<any> {
return new Promise((resolve, reject) => {
return new Promise(resolve => {
fetch(
url,
this.getOptions('post', headers, body, ignoreCertificate)
+13 -14
View File
@@ -6,26 +6,26 @@ async function run() {
const url = core.getInput('url')
? core.getInput('url')
: process.env.WEBHOOK_URL
? process.env.WEBHOOK_URL
: ''
? process.env.WEBHOOK_URL
: ''
const headers = core.getInput('headers')
? core.getInput('headers')
: process.env.headers
? process.env.headers
: null
? process.env.headers
: null
var body = core.getInput('body')
let body = core.getInput('body')
? core.getInput('body')
: process.env.data
? process.env.data
: null
? process.env.data
: null
const insecure = core.getInput('insecure')
? core.getInput('insecure') == 'true'
: process.env.insecure
? process.env.insecure == 'true'
: false
? process.env.insecure == 'true'
: false
// if github_event is set to true, append it to the body
if (process.env.github_event && body) {
@@ -33,10 +33,10 @@ async function run() {
const decodedBody = JSON.parse(body)
// set the github event
decodedBody.github_event = context;
decodedBody.github_event = context
// re-set the body
body = JSON.stringify(decodedBody);
body = JSON.stringify(decodedBody)
}
if (!url) {
@@ -58,10 +58,9 @@ async function run() {
error(res.status)
return
}
})
.catch(err => {
core.info(`Error: ${err}`);
core.info(`Error: ${err}`)
error(err.status)
return
})
@@ -74,4 +73,4 @@ function error(statusCode) {
throw new Error(`Request failed with status code: ${statusCode}`)
}
run()
run()