Add initial admin details and change make file issues - #3
Merged
Conversation
specfor
reviewed
Jul 23, 2026
specfor
requested changes
Jul 23, 2026
There was a problem hiding this comment.
Pull request overview
Adds configuration and tooling updates to support initial admin/user seeding and improve backend developer workflows (Makefile/sqlc/lint), with a few small runtime/handler adjustments.
Changes:
- Added initial admin/user email+password configuration fields, defaults, and new config unit tests.
- Updated Makefile targets (Windows-aware build/clean, added vet, adjusted test behavior/help output).
- Adjusted sqlc and golangci-lint configuration, plus small server/health handler changes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| backend-api/sqlc/sqlc.yaml | Updates sqlc config paths/output location for generated DB code. |
| backend-api/Makefile | Adds Windows-friendly build/clean, adds vet target, adjusts test targets/help. |
| backend-api/internal/handler/health.go | Wraps JSON encoding errors from the health endpoint. |
| backend-api/internal/config/config.go | Introduces initial admin/user config fields and environment loading defaults. |
| backend-api/internal/config/config_test.go | Adds unit tests for config loading and validation. |
| backend-api/coverage | Adds a coverage artifact file (likely accidental). |
| backend-api/cmd/server/main.go | Uses errors.Is for ErrServerClosed comparison and adds package comment. |
| backend-api/.golangci.yml | Updates linter config format and enabled linters. |
| backend-api/.env.example | Documents initial admin/user env vars for local development. |
Comments suppressed due to low confidence (1)
backend-api/Makefile:107
make helpoutput still claimsmake testruns with race detection, but thetesttarget now runs without-race. Update the help text to match the actual target behavior.
@echo Usage:
@echo make run - start the development server
@echo make test - run all tests with race detection
@echo make test-v - run tests with verbose output
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+41
to
45
| InitialAdminEmail: getEnv("INITIAL_ADMIN_EMAIL", "admin@civiclens.org"), | ||
| InitialAdminPassword: getEnv("INITIAL_ADMIN_PASSWORD", "AdminPass123!"), | ||
| InitialUserEmail: getEnv("INITIAL_USER_EMAIL", "user@civiclens.org"), | ||
| InitialUserPassword: getEnv("INITIAL_USER_PASSWORD", "UserPass123!"), | ||
| } |
Comment on lines
4
to
+7
| # Usage: | ||
| # make run – start the development server | ||
| # make test – run all tests with race detection | ||
| # make test-v – run tests with verbose output |
| @@ -0,0 +1 @@ | |||
| mode: atomic | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.