Skip to content

Commit

Permalink
Merge pull request #599 from joelwmale/develop
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
joelwmale authored Nov 8, 2022
2 parents fd99bb3 + 39b10a7 commit 2c43ebb
Show file tree
Hide file tree
Showing 4 changed files with 1,250 additions and 660 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webhook-action",
"version": "2.1.0",
"version": "2.2.0",
"description": "Github Webhook Action",
"main": "dist/main.js",
"scripts": {
Expand All @@ -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 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 2c43ebb

Please sign in to comment.