Skip to content

Conversation

@sharon504
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 24, 2025 18:07
@sharon504 sharon504 merged commit 5b3953d into main Oct 24, 2025
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 migrates the application from GCP to AWS infrastructure and updates the build tooling configuration. The changes disable Google OAuth authentication, update TypeScript compilation settings to use ES2022 modules with path alias resolution, and modify Docker deployment workflows to target EC2 instead of GCP.

Key Changes:

  • Disabled Google OAuth authentication by commenting out passport-related code
  • Updated TypeScript configuration for ES2022 modules with tsc-alias for path resolution
  • Migrated deployment from GCP to AWS EC2 with updated Docker compose configurations

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 aliases and added tsc-alias configuration
package.json Updated build script to include resolve-tspaths, moved jsonwebtoken to dependencies, added Docker scripts
docker-compose.yml Added new base compose file for shared service configuration
docker-compose.yaml Updated production compose configuration
docker-compose.dev.yml Added new development compose override file
Dockerfile.prod Added multi-stage production Dockerfile
Dockerfile.dev Added development Dockerfile
.github/workflows/main.yml Updated CI/CD to deploy to AWS EC2 instead of GCP
src/utils/sequelize.ts Updated error handling with explicit type casting
src/utils/seed.ts Added owner role validation and type assertions
src/utils/multer.ts Fixed multer type imports
src/routes/auth-routes.ts Commented out Google OAuth routes
src/controllers/google-auth-controller.ts Commented out entire Google OAuth controller
src/controllers/enquiry-controller.ts Added explicit type annotations for request handlers
src/controllers/ammenities-controller.ts Changed to fetch hostel by ID instead of using eager loading
src/config/passport.ts Commented out passport configuration
src/app.ts Commented out passport and session middleware
src/index.ts Commented out tsconfig-paths registration and seed import
src/models/hostel-model.ts Added 'available' field to interface
src/models/file-model.ts Added 'userId' field to interface
Comments suppressed due to low confidence (4)

src/utils/sequelize.ts:1

  • Casting error to 'undefined' will lose error information. The Logger.error method should accept unknown or Error type. Remove the type cast or cast to a more appropriate type like 'Error'.
    docker-compose.dev.yml:1
  • The 'context' field should point to a directory, not a Dockerfile. It should be './' with a separate 'dockerfile' field pointing to 'Dockerfile.dev', or the context should be '.' and dockerfile should be './Dockerfile.dev'.
    src/models/hostel-model.ts:1
  • The field 'availabe' appears to be a typo. Consider renaming to 'available' to match the newly added field on line 20, or remove the duplicate if this was the intended fix.
    src/controllers/ammenities-controller.ts:1
  • This creates an N+1 query problem by fetching hostels one at a time inside a loop. Consider collecting all unique hostelIds first, then fetching all hostels in a single query using Hostel.findAll({ where: { id: { [Op.in]: hostelIds } } }).

💡 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 after 'EC2_SSH_KEY' before closing braces. Should be '${{ secrets.EC2_SSH_KEY }}' for consistency with other secret references.

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