-
Notifications
You must be signed in to change notification settings - Fork 0
Poc #2
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
Poc #2
Conversation
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.
Pull Request Overview
This PR introduces a proof-of-concept setup for running acceptance tests against a newly built Hooks framework, adds core framework modules (config loading/validation, logging, request validation, lifecycle, builder, and Grape-based API), and updates project packaging and CI workflows.
- Add acceptance Dockerfile and scripts for spinning up tests in CI
- Implement core Hooks framework components (plugins, validators, loader, builder, API)
- Update gemspec, root Dockerfile removal, and GitHub Actions for acceptance testing
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
spec/acceptance/Dockerfile | New slim Ruby image setup for acceptance tests |
script/server | Revised server launcher to support --dev and use Puma |
script/acceptance | Bash script to run Docker compose and acceptance RSpec |
lib/hooks/plugins/request_validator/ | New base and GitHubWebhooks validator implementations |
lib/hooks/plugins/lifecycle.rb | Base lifecycle plugin class |
lib/hooks/handlers/base.rb | Base handler class |
lib/hooks/core/{signal_handler,logger_factory,config_*.rb,builder}.rb | Core building blocks: logging, config, signals, builder |
lib/hooks/app/api.rb | Full Grape API class with dynamic routing and handlers |
lib/hooks.rb | Entry point loading plugins and builder |
hooks.gemspec | Expanded files and executables |
handlers/test_handler.rb | Example handler |
docs/design.md | Updated docs renaming verify_signature to request_validator |
config.ru | Rack configuration file |
.github/workflows/acceptance.yml | CI workflow for acceptance tests |
Comments suppressed due to low confidence (2)
lib/hooks/plugins/request_validator/github_webhooks.rb:23
- This new validation logic should be covered by unit tests, especially cases for missing headers, invalid signatures, and error rescues.
def self.valid?(payload:, headers:, secret:, config:)
lib/hooks/app/api.rb:196
- The helper method is named
request_validator
but you're callingvalidate_request
, which will trigger a NoMethodError. Rename one to match the other.
validate_request(raw_body, headers, endpoint_config) if endpoint_config[:request_validator]
Co-authored-by: Copilot <[email protected]>
…so normalized by default as well
No description provided.