Skip to content

Conversation

@Anmol1696
Copy link
Contributor

No description provided.

@Anmol1696 Anmol1696 force-pushed the anmol/fix-function-job branch from 55452a0 to 8a68e73 Compare December 24, 2025 09:31
Copy link
Contributor

Copilot AI left a 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 getHeaders function to eliminate duplication
  • Added localhost detection and protocol/port handling for local development URLs
  • Updated documentation and configuration to support the new LOCAL_APP_PORT environment 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.

@Anmol1696 Anmol1696 merged commit 07dd24c into main Dec 24, 2025
33 checks passed
@Anmol1696 Anmol1696 deleted the anmol/fix-function-job branch December 24, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants