Skip to content

Conversation

@sharon504
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 24, 2025 18:08
@sharon504 sharon504 merged commit 38eb512 into staging Oct 24, 2025
0 of 3 checks passed
Copy link

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 production environment configurations and modifications from production to the staging branch. The changes primarily involve updating TypeScript build configuration, adding Docker support for development and production environments, commenting out Google OAuth functionality, and refining type safety across several files.

Key Changes:

  • Migrated from NodeNext to ES2022 module system with updated path resolution and added tsc-alias for build-time path resolution
  • Added Docker compose configurations for development and production environments with separate Dockerfiles
  • Commented out Google OAuth authentication code and dependencies while maintaining the codebase structure
  • Enhanced type safety by adding explicit type annotations and fixing type-related issues

Reviewed Changes

Copilot reviewed 31 out of 180 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Updated module system to ES2022, adjusted path mappings, and added tsc-alias configuration
tsc-alias.config.json Added standalone tsc-alias configuration file for path resolution
package.json Reorganized scripts for Docker workflows, moved jsonwebtoken to dependencies, updated package versions
docker-compose.yml Added new base Docker compose configuration
docker-compose.yaml Refactored existing compose file for production setup with nginx and certbot
docker-compose.dev.yml Added development-specific Docker compose configuration
Dockerfile.prod Created multi-stage production Docker build
Dockerfile.dev Created development Docker configuration
src/utils/sequelize.ts Added explicit type annotation for error handling
src/utils/seed.ts Added null check for ownerRole and type assertions
src/utils/multer.ts Updated type imports to use Express types
src/routes/auth-routes.ts Commented out Google OAuth routes
src/models/hostel-model.ts Added 'available' field to interface
src/models/file-model.ts Added 'userId' field to interface
src/index.ts Commented out tsconfig-paths and passport imports
src/controllers/index.ts Commented out googleAuthController export
src/controllers/google-auth-controller.ts Commented out entire file content
src/controllers/enquiry-controller.ts Added explicit type annotations for request handlers
src/controllers/ammenities-controller.ts Refactored hostel lookup logic
src/config/passport.ts Commented out entire file content
src/app.ts Commented out session and passport middleware
.github/workflows/main.yml Updated deployment target from GCP to EC2
nodemon.json Changed package manager from pnpm to npm
Comments suppressed due to low confidence (3)

src/utils/sequelize.ts:1

  • Casting error to undefined prevents proper error logging. The Logger.error likely expects the actual error object for meaningful error reporting. Remove the 'as undefined' cast to pass the error object correctly.
    src/models/hostel-model.ts:1
  • Corrected spelling of 'availabe' to 'available'.
    docker-compose.dev.yml:1
  • The build context should point to a directory, not a Dockerfile. Change 'context: ./Dockerfile.dev' to 'context: .' and add 'dockerfile: Dockerfile.dev' on the next line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jobs:
deploy:
deploy-to-production:
enviornment: production
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'enviornment' to 'environment'.

Suggested change
enviornment: production
environment: production

Copilot uses AI. Check for mistakes.
with:
host: ${{ secrets.EC2_HOST }} # 34.57.111.25
username: ${{ secrets.EC2_USER }} # Shravan
key: ${{ secrets.EC2_SSH_KEY}} # private key
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before closing braces in template expression. Change '${{ secrets.EC2_SSH_KEY}}' to '${{ secrets.EC2_SSH_KEY }}' for consistency with other template expressions in the file.

Suggested change
key: ${{ secrets.EC2_SSH_KEY}} # private key
key: ${{ secrets.EC2_SSH_KEY }} # private key

Copilot uses AI. Check for mistakes.
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