-
Notifications
You must be signed in to change notification settings - Fork 32
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 opbot issue in public chan (#2850) #2851
Conversation
WalkthroughA modification was made to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added
retrieveChannelIfExists
function to safely retrieve channel ID - Defaulted channel ID to 'unknown' if not present in Slack event
- Ensured tracing middleware does not fail when channel information is missing
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- contrib/opbot/botmd/middleware.go (2 hunks)
Additional comments not posted (2)
contrib/opbot/botmd/middleware.go (2)
26-26
: Improvement: Handle nil scenarios for event or channel.The use of
retrieveChannelIfExists
improves the robustness of thetracingMiddleware
function by handling nil scenarios.
40-47
: New Function:retrieveChannelIfExists
.The function correctly handles nil scenarios for the event or channel, returning
unknownChannel
if either is nil.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2851 +/- ##
===================================================
+ Coverage 25.34255% 25.65579% +0.31324%
===================================================
Files 783 768 -15
Lines 56269 55239 -1030
Branches 80 80
===================================================
- Hits 14260 14172 -88
+ Misses 40533 39594 -939
+ Partials 1476 1473 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Enhanced channel retrieval stability in
/contrib/opbot
- Improved handling of missing event/channel info in
/contrib/opbot
- Fixed crash issue in public channels in
/contrib/opbot
No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
[goreleaser]
Description
Fixes crash (addresses #2850)
Summary by CodeRabbit