Skip to content

Commit

Permalink
fix: Fix this[writeSym] is not a function error
Browse files Browse the repository at this point in the history
This error is caused by passing the Pino logger to the GitHub octokit library.

More details here: pinojs/pino#545
  • Loading branch information
baumandm committed Apr 25, 2022
1 parent 1130f32 commit f60663c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/backend/src/lib/backends/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ export function makeOctokit(token: string = process.env.GITHUB_ACCESS_TOKEN!): O
auth: token,
userAgent: `iex ${process.env.IEX_VERSION || '0.0.0'}`,
baseUrl: process.env.GITHUB_REST_API_URL !== '' ? process.env.GITHUB_REST_API_URL : undefined,
log: logger,
log: {
debug: logger.debug.bind(logger),
info: logger.info.bind(logger),
warn: logger.warn.bind(logger),
error: logger.error.bind(logger)
},
previews: ['mercy-preview']
});
}
Expand Down

0 comments on commit f60663c

Please sign in to comment.