Skip to content

Conversation

@zensgit
Copy link
Owner

@zensgit zensgit commented Sep 24, 2025

  • Align jive-api/docker-compose.dev.yml ports with manager: DB 5433, Redis 6380, Adminer 9080\n- Add Makefile hooks target to enable pre-commit (api-lint)\n\nValidation:\n- ./jive-manager.sh start all-dev should now map to the same ports as compose.\n- Adminer reachable at http://localhost:9080\n\nCI: Expect no behavior changes; just dev environment consistency.

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 03:58
@gemini-code-assist
Copy link

Summary of Changes

Hello @zensgit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the development environment by standardizing port configurations for key services in Docker Compose and enhancing code quality practices. It ensures that development ports for PostgreSQL, Redis, and Adminer are consistent with the jive-manager setup, reducing configuration discrepancies. Additionally, it introduces a convenient Makefile target to enable Git pre-commit hooks, facilitating automated linting and maintaining code standards.

Highlights

  • Development Environment Port Alignment: The Docker Compose development configuration (jive-api/docker-compose.dev.yml) has been updated to align the exposed ports for PostgreSQL (5433), Redis (6380), and Adminer (9080) with the default ports used by jive-manager, ensuring consistency across development setups.
  • Git Hooks Integration: A new hooks target has been added to the Makefile, allowing developers to easily enable local Git hooks. This configuration will ensure that pre-commit hooks, such as api-lint, are automatically executed before commits, promoting code quality.
  • API Development Mode Indicator: A new file, .pids/api.mode, has been introduced with the content 'dev', likely serving as an indicator for the API's current operating mode within the development environment.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 aligns development environment port configurations between the API's Docker Compose setup and the manager script, and adds a new git hooks target to enable pre-commit linting.

  • Port standardization across development tools for consistency
  • Addition of git hooks configuration for automated code quality checks
  • Minor CI workflow enhancement to include docs-only optimization tracking

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
jive-api/docker-compose.dev.yml Updates port mappings to align with manager script defaults (DB 5433, Redis 6380, Adminer 9080)
Makefile Adds new hooks target to configure git pre-commit hooks for api-lint
.pids/api.mode Creates new file to track API development mode state
.github/workflows/ci.yml Enhances CI summary with docs-only optimization tracking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

.pids/api.mode Outdated
@@ -0,0 +1 @@
dev
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

This new file appears to be tracking API mode state but lacks documentation. Consider adding a comment or README explaining its purpose and how it's used in the development workflow.

Copilot uses AI. Check for mistakes.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aligns development environment ports for consistency and adds a Makefile target for git hooks. The port alignment changes in docker-compose.dev.yml are correct and well-justified. However, I've identified two issues: a duplicated hooks target in the Makefile which should be consolidated, and a new runtime state file (.pids/api.mode) being added to version control, which should be git-ignored instead. Addressing these points will improve the maintainability and developer experience of the repository.

Comment on lines +163 to +166
.PHONY: hooks
hooks:
@git config core.hooksPath .githooks
@echo "Git hooks enabled (pre-commit will run make api-lint)"

Choose a reason for hiding this comment

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

high

This change introduces a hooks target that duplicates an existing one on lines 148-150. Having duplicate targets in a Makefile can lead to unpredictable behavior and makes the file harder to maintain.

Please remove this duplicated block. You can enhance the existing target by adding .PHONY: hooks above it for correctness, like so:

.PHONY: hooks
hooks:
	@git config core.hooksPath .githooks
	@echo "✅ Git hooks enabled (pre-commit runs make api-lint)"

.pids/api.mode Outdated
@@ -0,0 +1 @@
dev

Choose a reason for hiding this comment

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

medium

The .pids directory seems intended for runtime-generated files, such as process IDs and service modes. These files are specific to a developer's local environment and should not be tracked in version control.

Committing this file can lead to unnecessary merge conflicts and noise in the repository history. It's recommended to add the .pids/ directory to your project's .gitignore file.

@zensgit zensgit enabled auto-merge (squash) September 24, 2025 04:17
@zensgit
Copy link
Owner Author

zensgit commented Sep 24, 2025

Ready to merge once approved. Summary:\n- Align dev compose ports with manager (DB 5433, Redis 6380, Adminer 9080)\n- Add Makefile hooks target for pre-commit (api-lint)\n- CI: Flutter job short-circuits when no Flutter changes\n\nLocal verify after merge:\n- ./jive-manager.sh stop && ./jive-manager.sh start all-dev\n- DB: psql postgresql://postgres:postgres@localhost:5433/jive_money -c 'select 1'\n- Adminer: http://localhost:9080\n- API: curl -s http://localhost:8012/health

- Add conditional execution to field-compare job
- Only run when flutter_changed == 'true'
- Fixes artifact not found error when Flutter tests are skipped
@zensgit zensgit merged commit 2b44e75 into main Sep 24, 2025
10 checks passed
@zensgit zensgit deleted the chore/compose-port-alignment-hooks branch September 24, 2025 06:45
@zensgit zensgit mentioned this pull request Oct 15, 2025
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.

1 participant