Skip to content

feat: add ci:update and ci:add commands#2

Merged
damienlagae merged 2 commits intomainfrom
feat/ci-update-add-commands
Feb 26, 2026
Merged

feat: add ci:update and ci:add commands#2
damienlagae merged 2 commits intomainfrom
feat/ci-update-add-commands

Conversation

@damienlagae
Copy link
Member

Summary

  • Add ci:update command to detect and regenerate existing CI configuration (GitLab, GitHub, Azure)
  • Add ci:add command to add a new CI provider with --force to overwrite
  • Enrich ProjectDetector with CI provider detection, database detection from compose.yaml, and tool file detection
  • Extract shared CI logic into CiCommandHelper for options, config building, and file generation

New files

  • src/Command/CiUpdateCommand.php
  • src/Command/CiAddCommand.php
  • src/Command/CiCommandHelper.php

Modified files

  • src/Detector/ProjectDetector.php — 6 new detection methods
  • src/Application.php — register new commands
  • CI templates and generators (Dockerfile, GitLab, GitHub)

Test plan

  • 168 tests, 280 assertions, 0 failures
  • ci:update fails when no CI detected
  • ci:update regenerates GitLab/GitHub when files exist
  • ci:update respects --php-version and --database overrides
  • ci:add requires --provider in non-interactive mode
  • ci:add blocks existing provider without --force
  • ci:add generates correct files per provider
  • ProjectDetector detects CI providers, databases, and tool files

Add two targeted commands for managing CI configuration without
re-running the full init flow:

- ci:update: detects existing CI providers and regenerates their files
- ci:add: adds a new CI provider with --force to overwrite

Enrich ProjectDetector with CI provider detection, database detection
from compose.yaml, and tool file detection. Extract shared CI logic
into CiCommandHelper.
@damienlagae damienlagae merged commit fc2d51d into main Feb 26, 2026
3 checks passed
@damienlagae damienlagae deleted the feat/ci-update-add-commands branch February 26, 2026 09:51
@damienlagae damienlagae linked an issue Feb 26, 2026 that may be closed by this pull request
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.

feat: add Docker image caching to GitLab CI template

1 participant