Skip to content

Add git approval sync per repository#1339

Merged
frankdekker merged 9 commits intomasterfrom
Add-git-approval-sync-per-repository
Feb 15, 2026
Merged

Add git approval sync per repository#1339
frankdekker merged 9 commits intomasterfrom
Add-git-approval-sync-per-repository

Conversation

@frankdekker
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 15, 2026 18:27
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 pull request adds a per-repository toggle to control whether review approvals should be synchronized to GitLab merge requests. This feature allows administrators to selectively enable/disable approval synchronization for individual repositories, providing more granular control over GitLab integration.

Changes:

  • Added a new gitApprovalSync boolean field to the Repository entity with a default value of true to maintain backward compatibility
  • Updated the message handler to check the repository's approval sync setting before synchronizing reviewer state changes to GitLab
  • Added a checkbox control in the repository admin form under the Integrations section (only visible when GitLab integration is configured)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Entity/Repository/Repository.php Added gitApprovalSync boolean property with getter/setter methods following the existing naming convention (isGitApprovalSync())
migrations/Version20260215180800.php Database migration to add the git_approval_sync column with default value of 1 (enabled)
src/MessageHandler/Gitlab/ReviewerStateChangeMessageHandler.php Added check to skip approval sync when gitApprovalSync is disabled on the repository
src/Form/Repository/RepositoryType.php Added checkbox field for the approval sync setting, conditionally displayed when GitLab is configured
templates/app/admin/edit_repository.html.twig Added UI checkbox in the Integrations section using the existing checkboxFieldRow macro
translations/messages+intl-icu.en.php Added translation key for the checkbox label
tests/Unit/Form/Repository/RepositoryTypeTest.php Updated test to expect 12 form fields instead of 11
tests/Unit/MessageHandler/Gitlab/ReviewerStateChangeMessageHandlerTest.php Added test for skipping when disabled, updated existing tests to explicitly set the sync flag

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (9597ded) to head (6d76ead).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1339   +/-   ##
=========================================
  Coverage     99.98%   99.98%           
- Complexity     3470     3477    +7     
=========================================
  Files           609      610    +1     
  Lines          9602     9620   +18     
=========================================
+ Hits           9601     9619   +18     
  Misses            1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@frankdekker frankdekker merged commit 304574c into master Feb 15, 2026
5 checks passed
@frankdekker frankdekker deleted the Add-git-approval-sync-per-repository branch February 15, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant