Add WebhookProcessor, public API exports, and handler tests#3
Open
Keramikus-97 wants to merge 1 commit into
Open
Add WebhookProcessor, public API exports, and handler tests#3Keramikus-97 wants to merge 1 commit into
Keramikus-97 wants to merge 1 commit into
Conversation
- Add handler.py with WebhookProcessor that orchestrates the full webhook processing flow: signature verification, payload parsing, command extraction, and acknowledgement via reaction - Export all public symbols from __init__.py - Add comprehensive tests for the handler module (9 tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The repo had all the building blocks (comment parsing, config, GitHub client, webhook handler) but no orchestration layer tying them together, and
__init__.pydidn't export any public symbols.New
handler.py—WebhookProcessor: End-to-end webhook processing that chains signature verification →parse_raw→extract_commands→ acknowledgement reaction:Acknowledgement failures (e.g. API 500) are caught and logged so they never bubble up.
__init__.py: Exports all public symbols (Config,GitHubClient,WebhookProcessor,ParsedCommand, etc.) via__all__.Tests: 9 new tests covering command extraction, signature pass/fail, unsupported events, acknowledge failures, and multi-command payloads.
Note: A CI workflow (
.github/workflows/ci.yml) was also prepared locally but could not be pushed due to missingworkflowscope on the OAuth token. It runsruff check/format+pytest --covacross Python 3.10–3.12. You can add it manually or grant theworkflowscope.Link to Devin session: https://app.devin.ai/sessions/306b14b0580b4a1d830a4afc1c2dfd86
Requested by: @Keramikus-97