Skip to content

Commit

Permalink
Merge branch 'master' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
sarisia committed Apr 3, 2022
2 parents e529138 + d37568d commit bf7d621
Show file tree
Hide file tree
Showing 7 changed files with 3,011 additions and 1,766 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ ARG EXTRA_NODE_VERSION=12.13
RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
RUN sudo -u node npm install -g npm-check-updates
# RUN sudo -u node npm install -g npm-check-updates
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@
"postCreateCommand": "npm i",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
"remoteUser": "node",

"features": {
"fish": "latest"
}
}
4 changes: 2 additions & 2 deletions .github/workflows/dry-run-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- ubuntu-latest
- ubuntu-20.04
- ubuntu-18.04
- ubuntu-16.04
- macos-latest
- macos-11.0
- macos-11
- macos-10.15
- windows-latest
- windows-2022
- windows-2019

runs-on: ${{ matrix.os }}
Expand Down
4,733 changes: 2,986 additions & 1,747 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"description": "Post Github Actions CI status to Discord",
"main": "lib/main.js",
"scripts": {
"test": "jest --verbose --ci --detectOpenHandles",
"build": "npx tsc",
"release": "rm -rf node_modules && npm ci && npm run build && npm prune --production",
"version": "npm run release && git add ."
"test": "jest --verbose --ci --detectOpenHandles && npm run build",
"build": "tsc",
"release": "npm ci && npm run build && npm prune --production",
"version": "npm run release && git add .",
"deps": "ncu --doctor -u"
},
"author": "Sarisia",
"license": "MIT",
"devDependencies": {
"@types/jest": "^26.0.23",
"jest": "^27.0.3",
"ts-jest": "^27.0.2",
"typescript": "^4.3.2"
"@types/jest": "^27.4.1",
"jest": "^27.5.1",
"npm-check-updates": "^12.5.5",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
},
"dependencies": {
"@actions/core": "^1.3.0",
"@actions/github": "^5.0.0",
"@types/node": "^15.6.1",
"axios": "^0.21.1"
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.1",
"@types/node": "^17.0.23",
"axios": "^0.26.1"
}
}
2 changes: 1 addition & 1 deletion src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function formatEvent(event: string, payload: Object): string {
if (event in formatters) {
try {
return formatters[event](payload) || msg
} catch(e) {
} catch(e: any) {
logDebug(`Failed to generate eventDetail for ${event}: ${e}\n${e.stack}`)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function run() {

logInfo(`Triggering ${inputs.webhooks.length} webhook${inputs.webhooks.length>1 ? 's' : ''}...`)
await Promise.all(inputs.webhooks.map(w => wrapWebhook(w.trim(), payload)))
} catch(e) {
} catch(e: any) {
logError(`Unexpected failure: ${e} (${e.message})`)
}
}
Expand All @@ -28,7 +28,7 @@ function wrapWebhook(webhook: string, payload: Object): Promise<void> {
return async function() {
try {
await axios.post(webhook, payload)
} catch(e) {
} catch(e: any) {
if (e.response) {
logError(`Webhook response: ${e.response.status}: ${JSON.stringify(e.response.data)}`)
} else {
Expand Down

0 comments on commit bf7d621

Please sign in to comment.