mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-08-25 08:08:00 +00:00
commit
2c43ebbef8
@ -21,5 +21,5 @@ outputs:
|
||||
status:
|
||||
description: 'The status of the webhook event'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/main.js'
|
||||
using: 'node16'
|
||||
main: 'dist/main.js'
|
||||
|
26
package.json
26
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "webhook-action",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"description": "Github Webhook Action",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
@ -23,20 +23,20 @@
|
||||
"author": "Joel Male",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"node-fetch": "^2.6.1"
|
||||
"@actions/core": "^1.10.0",
|
||||
"node-fetch": "^3.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/node": "^14.14.31",
|
||||
"@typescript-eslint/parser": "^4.15.2",
|
||||
"@vercel/ncc": "^0.27.0",
|
||||
"eslint": "^7.20.0",
|
||||
"eslint-plugin-github": "^4.1.1",
|
||||
"eslint-plugin-jest": "^24.1.5",
|
||||
"@types/jest": "^29.2.1",
|
||||
"@types/node": "^18.11.9",
|
||||
"@typescript-eslint/parser": "^5.42.0",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-plugin-github": "^4.4.0",
|
||||
"eslint-plugin-jest": "^27.1.3",
|
||||
"https": "^1.0.0",
|
||||
"js-yaml": "^4.0.0",
|
||||
"prettier": "2.2.1",
|
||||
"typescript": "^4.2.2"
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "2.7.1",
|
||||
"typescript": "^4.8.4"
|
||||
}
|
||||
}
|
||||
|
@ -7,16 +7,19 @@ async function run() {
|
||||
: process.env.WEBHOOK_URL
|
||||
? process.env.WEBHOOK_URL
|
||||
: ''
|
||||
|
||||
const headers = core.getInput('headers')
|
||||
? core.getInput('headers')
|
||||
: process.env.headers
|
||||
? process.env.headers
|
||||
: null
|
||||
|
||||
const body = core.getInput('body')
|
||||
? core.getInput('body')
|
||||
: process.env.data
|
||||
? process.env.data
|
||||
: null
|
||||
|
||||
const insecure = core.getInput('insecure')
|
||||
? core.getInput('insecure') == 'true'
|
||||
: process.env.insecure
|
||||
@ -47,12 +50,12 @@ async function run() {
|
||||
return
|
||||
}
|
||||
|
||||
// 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())
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
error(err.status)
|
||||
|
Loading…
Reference in New Issue
Block a user