Skip to content

Commit

Permalink
feat: Add support for gcl-slack producer
Browse files Browse the repository at this point in the history
  • Loading branch information
simenandre committed Apr 12, 2022
1 parent 946c6e8 commit a11c6cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -34,10 +34,13 @@
"build": "tsc && tsc -p tsconfig.cjs.json",
"lint": "eslint 'src/**/*.ts' --fix",
"test": "jest --coverage src",
"prepare": "husky install .github/husky"
"prepare": "husky install .github/husky",
"format": "prettier --write src"
},
"prettier": "@cobraz/prettier",
"devDependencies": {
"@bjerk/eslint-config": "^1.0.0",
"@cobraz/prettier": "^2.0.0",
"@types/jest": "^27.0.2",
"eslint": "^7.32.0",
"husky": "^7.0.2",
Expand Down
5 changes: 4 additions & 1 deletion src/parse-log.ts
Expand Up @@ -8,7 +8,10 @@ export async function parseLog(
}

if (
entry.operation?.producer === 'github.com/bjerkio/nestjs-slack@v1' &&
[
'github.com/bjerkio/gcl-slack@v1',
'github.com/bjerkio/nestjs-slack@v1',
].includes(entry.operation?.producer) &&
typeof entry.jsonPayload?.message !== 'string'
) {
return entry.jsonPayload?.message?.slack;
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -334,6 +334,11 @@
eslint-plugin-promise "^5.1.0"
eslint-plugin-unicorn "^34.0.1"

"@cobraz/prettier@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@cobraz/prettier/-/prettier-2.0.0.tgz#4219ed6024e484a3e4e08ad30b2ba0f33660573e"
integrity sha512-3Kug2HKJPW96INaTFGtqPP5tJaMRwhZkA2e2mLQ7REp2Wzd0Brmg4uL94zAFKCPEmX59iUTZF0GAHtljACqwWA==

"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
Expand Down

0 comments on commit a11c6cb

Please sign in to comment.