-
Notifications
You must be signed in to change notification settings - Fork 5
fix: add some abstraction in place #457
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
Conversation
55452a0 to
8a68e73
Compare
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 adds code abstraction and improves localhost development support. The main goal is to reduce code duplication by extracting repeated header extraction logic and to enhance the local development experience by properly generating localhost URLs with configurable ports.
- Extracted header extraction logic into a reusable
getHeadersfunction to eliminate duplication - Added localhost detection and protocol/port handling for local development URLs
- Updated documentation and configuration to support the new
LOCAL_APP_PORTenvironment variable
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
jobs/knative-job-fn/src/index.ts |
Refactored duplicate header extraction code into a new getHeaders function used in middleware and error handling |
functions/send-email-link/src/index.ts |
Added localhost detection logic and support for configurable local development ports with http protocol for dry-run mode |
jobs/DEVELOPMENT_JOBS.md |
Added documentation explaining localhost resolution and LOCAL_APP_PORT behavior |
functions/send-email-link/README.md |
Documented the new LOCAL_APP_PORT environment variable |
docker-compose.jobs.yml |
Added LOCAL_APP_PORT environment variable configuration with default value of 3000 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.