Skip to content

Chore: cleanup cicd setup#59

Merged
Meldiron merged 2 commits intomainfrom
chore-cicd-cleanup
Feb 18, 2026
Merged

Chore: cleanup cicd setup#59
Meldiron merged 2 commits intomainfrom
chore-cicd-cleanup

Conversation

@Meldiron
Copy link
Contributor

@Meldiron Meldiron commented Feb 18, 2026

Summary by CodeRabbit

  • Chores

    • Updated environment variable naming conventions across CI/CD workflows and test configurations for improved clarity.
    • Increased PHPStan memory limit allocation for enhanced analysis performance.
  • Tests

    • Updated test suites to use new environment variable names.
  • Bug Fixes

    • Added debugging output to GitHub adapter for improved troubleshooting.

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Walkthrough

This pull request updates environment variable naming conventions across workflow, configuration, and test files by prefixing GitHub-related variables with TESTS_GITHUB_ (e.g., PRIVATE_KEYTESTS_GITHUB_PRIVATE_KEY). Additionally, it adds a memory limit flag to the PHPStan analysis command in composer.json, introduces a debug var_dump statement in the GitHub adapter's getOwnerName method, refactors the Gitea test setup to use a local variable before assignment, and updates the Gitea URL environment variable reference in the test configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: renaming and reorganizing environment variables and CI/CD configuration across workflow, test, and Docker files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-cicd-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Meldiron Meldiron requested a review from Copilot February 18, 2026 09:46
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/VCS/Adapter/GiteaTest.php (1)

29-29: Redundant ?? '' fallback when a non-null default is already provided.

System::getEnv('TESTS_GITEA_URL', 'http://gitea:3000') cannot return null because a non-null default is supplied, making the ?? '' fallback dead code.

♻️ Proposed cleanup
-        $giteaUrl = System::getEnv('TESTS_GITEA_URL', 'http://gitea:3000') ?? '';
+        $giteaUrl = System::getEnv('TESTS_GITEA_URL', 'http://gitea:3000');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/VCS/Adapter/GiteaTest.php` at line 29, Remove the redundant null
coalescing fallback: System::getEnv('TESTS_GITEA_URL', 'http://gitea:3000')
already supplies a non-null default, so drop the trailing "?? ''" and assign the
result directly to $giteaUrl (locate the assignment to $giteaUrl in
GiteaTest.php where System::getEnv is called).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/VCS/Adapter/Git/GitHub.php`:
- Around line 427-428: Remove the debugging var_dump($response) call left in the
GitHub adapter (it prints the full API response to stdout and must not be in
production); locate the occurrence of var_dump($response) inside the GitHub
class (in src/VCS/Adapter/Git/GitHub.php) and delete it, and if you need to
retain visibility for debugging replace it with a proper logging call (e.g., use
the class logger or return the response) or wrap it behind a debug flag so it
does not print in production.

---

Nitpick comments:
In `@tests/VCS/Adapter/GiteaTest.php`:
- Line 29: Remove the redundant null coalescing fallback:
System::getEnv('TESTS_GITEA_URL', 'http://gitea:3000') already supplies a
non-null default, so drop the trailing "?? ''" and assign the result directly to
$giteaUrl (locate the assignment to $giteaUrl in GiteaTest.php where
System::getEnv is called).

Copy link
Contributor

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 standardizes environment variable naming for CI/CD testing by adding a TESTS_ prefix to test-specific environment variables, making it clearer that these variables are for testing purposes rather than production use. Additionally, it increases the PHPStan memory limit and includes debugging output in the GitHub adapter.

Changes:

  • Renamed test environment variables to use TESTS_ prefix (e.g., PRIVATE_KEYTESTS_GITHUB_PRIVATE_KEY)
  • Increased PHPStan memory limit to 512M for better static analysis performance
  • Added debugging var_dump statement in GitHub adapter's getOwnerName method

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/tests.yml Updated workflow to use renamed test environment variables with TESTS_ prefix
docker-compose.yml Updated Docker Compose environment variables to match new naming convention
tests/VCS/Base.php Updated test to use TESTS_GITHUB_INSTALLATION_ID
tests/VCS/Adapter/GitHubTest.php Updated test setup to use all three renamed GitHub test variables
tests/VCS/Adapter/GiteaTest.php Updated to use TESTS_GITEA_URL and refactored adapter initialization for better code clarity
composer.json Increased PHPStan memory limit from default to 512M
src/VCS/Adapter/Git/GitHub.php Added var_dump debugging statement in getOwnerName method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Meldiron Meldiron merged commit 14f3a90 into main Feb 18, 2026
4 checks passed
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.

3 participants