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