fix (full-sync): Adding pino logger for probot update#961
Conversation
|
@decyjphr - can we get this considered for an upcoming release? |
There was a problem hiding this comment.
Pull request overview
This PR updates the full-sync CLI entrypoint to restore logging compatibility after the Probot v14 upgrade by explicitly providing a logger to createProbot, and adds unit tests around performFullSync to prevent regressions.
Changes:
- Create a
pinologger and pass it tocreateProbotviaoverrides.logto avoidprobot.logbeingnull. - Add a null-guard around
settings.errorsto avoid crashing whensyncInstallation()returnsnull. - Export
performFullSyncand add unit tests for logger wiring and null-safety.
Show a summary per file
| File | Description |
|---|---|
| full-sync.js | Adds a pino logger override for Probot v14 and exports performFullSync for testing. |
| test/unit/full-sync.test.js | Introduces unit tests for performFullSync (logger override + null settings). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 3
|
It seems also related to #955 |
Clearing mocks after setting them up wiped the mockImplementation before each test ran, making the setup a no-op.
|
@decyjphr - Thanks, this is ready for another review |
|
We hit the same crash on 2.1.21: full-sync dies at startup with We've been carrying a local patch that does @decyjphr, it would be good to see this land, since full-sync is unusable on probot 14 without it. |
With the Probot v14 update, it seems that logging in full-sync no longer works:
This PR has the following changes:
pino)performFullSyncin full-sync runs okay (test fails without the logger change; passes with it)