fix: replace hardcoded postgres creds and deployment URLs#7
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGitHub Actions workflows in the CD and CI pipelines replace hardcoded configuration values with environment-specific GitHub Actions variables and secrets. The CD workflow sources deployment URLs dynamically; the CI workflow retrieves Postgres credentials from secrets to construct the test DATABASE_URL. ChangesWorkflow Configuration Externalization
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 22-24: The workflow uses secrets for POSTGRES_USER,
POSTGRES_PASSWORD, POSTGRES_DB (and the derived DATABASE_URL) which are empty
for forked pull_request runs; change those environment expressions to provide
safe defaults using GitHub Actions coalescing, e.g. replace uses of ${{
secrets.TEST_POSTGRES_USER }} / ${{ secrets.TEST_POSTGRES_PASSWORD }} / ${{
secrets.TEST_POSTGRES_DB }} with expressions like ${{ secrets.TEST_POSTGRES_USER
!= '' && secrets.TEST_POSTGRES_USER || 'postgres' }} (and similar for
password/db) and rebuild DATABASE_URL from those fallback-backed values so CI
starts correctly on forked PRs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 687a668a-f374-4d87-a636-73ab1783c94c
📒 Files selected for processing (2)
.github/workflows/cd.yml.github/workflows/ci.yml
Description
Type of Change
feat— New featurefix— Bug fixrefactor— Code refactoring (no functional change)docs— Documentation updatetest— Adding or updating testschore— Maintenance (dependencies, CI, tooling)Related Issue
Closes #
Changes Made
-The CI will fail until the following secrets are added to the repository by an admin:
TEST_POSTGRES_USER
TEST_POSTGRES_PASSWORD
TEST_POSTGRES_DB
-Also add environment variables under staging/production environments:
STAGING_URL = https://api.staging.meetmind.hng14.com
PROD_URL = https://api.meetmind.hng14.com
Proof of Work
API Response / Screenshots
Test Cases
test_<action>_<expected_outcome>_<condition>test_<action>_<expected_outcome>_<condition>Test output
Checklist
<type>/<short-description>)uv run pytest)Summary by CodeRabbit