Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(probot): passes logger to webhooks #2010

Merged
merged 2 commits into from May 1, 2024
Merged

Conversation

gr2m
Copy link
Contributor

@gr2m gr2m commented Apr 30, 2024

Current behavior:

const probot = new Probot({ log: myCustomLog });
probot.on("my_custom_event", handler);
// logs with console, not with `myCustomLog`

With this pull request, myCustomLog will be passed to webhooks and the warning will be logged using the passed logger instead of native console

@gr2m gr2m requested a review from a team as a code owner April 30, 2024 22:54
with:
node-version: ${{ matrix.node-version }}
node-version-file: ${{ matrix.node-version }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You aren't passing a file name here, so it should still be node-version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I know, just messing around

@gr2m
Copy link
Contributor Author

gr2m commented Apr 30, 2024

@wolfy1339 any idea why the type errors suddenly occur? https://github.com/probot/probot/actions/runs/8902784149/job/24449370174?pr=2010

I see them locally as well, I'd expect given that it installs from the lock file, there should be unrelated errors

GitHub
🤖 A framework for building GitHub Apps to automate and improve your workflow - fix(probot): passes logger to webhooks · 6c599fc

@wolfy1339
Copy link
Collaborator

It seems there's a version mismatch between the version of @octokit/webhooks-types that is required in the version of @octokit/webhooks and the one required here.

As for the rest, I have to look deeper

@wolfy1339
Copy link
Collaborator

It seems these build failures have been happening for a while.

I think #1917 has some patches that resolves some of these issues, but it was never merged

@gr2m
Copy link
Contributor Author

gr2m commented Apr 30, 2024

I think #1917 has some patches that resolves some of these issues, but it was never merged

Okay, I'll have a quick look, but this might not be worth the hassle then :(

@gr2m
Copy link
Contributor Author

gr2m commented Apr 30, 2024

I'll check out #1917, maybe I can figure out the remaining failing test and get it merged after all

@gr2m
Copy link
Contributor Author

gr2m commented Apr 30, 2024

I think I figured it out: 72231dc 🤞🏼

I gotta run home and take care of kids. If tests pass on #1917, feel free to merge it, I'll rebase this PR later

@gr2m gr2m force-pushed the 12.x-pass-log-to-webhooks branch from e1f099e to 3a23691 Compare May 1, 2024 00:16
@gr2m gr2m force-pushed the 12.x-pass-log-to-webhooks branch from 3a23691 to d66056c Compare May 1, 2024 00:20
@gr2m
Copy link
Contributor Author

gr2m commented May 1, 2024

once merged, I'll apply the fix to master as well. Should have started there, but ran into it in a project that still uses v12

@wolfy1339 wolfy1339 merged commit 3dcb058 into 12.x May 1, 2024
11 checks passed
@wolfy1339 wolfy1339 deleted the 12.x-pass-log-to-webhooks branch May 1, 2024 00:25
Copy link

github-actions bot commented May 1, 2024

🎉 This PR is included in version 12.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants