Skip to content

feat: Implement custom triggers for VCS builds#11623

Open
hmacr wants to merge 12 commits into1.9.xfrom
ser-401
Open

feat: Implement custom triggers for VCS builds#11623
hmacr wants to merge 12 commits into1.9.xfrom
ser-401

Conversation

@hmacr
Copy link
Copy Markdown
Contributor

@hmacr hmacr commented Mar 24, 2026

Closes SER-401

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8206d490-73c4-40b9-af73-3dd1289aca52

📥 Commits

Reviewing files that changed from the base of the PR and between 0bbe82a and a8452db.

📒 Files selected for processing (2)
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php

📝 Walkthrough

Walkthrough

Adds conditional deployment triggering based on branch and path patterns: two new array attributes (providerBranches, providerPaths) are added to the functions and sites collections in app config. A new Appwrite\Vcs\Validator\BuildTrigger class implements glob-based include/exclude pattern matching. GitHub event handlers now fetch affected files for pushes and pull requests and pass them into deployment creation. Deployment logic (createGitDeployments) uses the new validator to skip builds when branch or path criteria are not met. Unit tests for BuildTrigger were added.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% 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
Title check ✅ Passed The title 'feat: Implement custom triggers for VCS builds' accurately describes the main change: adding BuildTrigger validator and conditional logic to control VCS deployments based on branch and path patterns.
Description check ✅ Passed The description references ticket SER-401 which is related to the changeset, though minimal detail is provided about the implementation.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ser-401

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.

@hmacr hmacr changed the title Ser 401 feat: implement custom triggers for VCS builds Mar 24, 2026
@hmacr hmacr changed the title feat: implement custom triggers for VCS builds feat: Implement custom triggers for VCS builds Mar 24, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR implements branch and path-based build triggers for VCS deployments (SER-401), allowing functions and sites to filter which GitHub pushes/PRs actually trigger a build based on configurable branch patterns and file path patterns. Two new attributes (providerBranches, providerPaths) are added to the project schema, a new BuildTrigger glob validator is introduced, and the createGitDeployments flow is wired to skip builds that don't match the configured patterns.

Key changes:

  • New BuildTrigger validator with glob pattern support (*, **, ?, !-negation)
  • isResourceBuildable helper in the Deployment trait checks branch and path patterns before creating a deployment
  • Affected files are fetched from GitHub (via getPullRequestFiles for PRs, or from the push payload for pushes) and passed through the pipeline
  • Critical logic bug in path filtering: isResourceBuildable returns false as soon as any single changed file does not match the path patterns (AND semantics), but the correct behavior is to trigger the build when at least one file matches (OR semantics). A PR that changes src/app.ts and README.md with providerPaths = ['src/**'] would incorrectly skip the build.
  • utopia-php/vcs is pinned to a dev branch (dev-ser-401) and should be replaced with a stable release before merging into 1.9.x.

Confidence Score: 1/5

  • Not safe to merge — a logic inversion in the path filter will silently suppress builds that should be triggered, and the dependency on a dev branch is inappropriate for a release branch.
  • The path-aggregation logic in isResourceBuildable is backwards (AND vs OR), which is a correctness bug that would cause builds to be silently skipped whenever a push includes any file outside the configured paths. The utopia-php/vcs dev-branch pin is also not appropriate for 1.9.x. Both issues need to be resolved before this is safe to ship.
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php (path filter logic bug) and composer.json (dev-branch dependency).

Important Files Changed

Filename Overview
src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php Adds isResourceBuildable helper and a new $providerAffectedFiles parameter to createGitDeployments. Contains a critical logic bug: the path filter loop skips the build when ANY file does not match the patterns, but the correct behavior is to skip only when NO files match (OR semantics, not AND semantics).
src/Appwrite/Vcs/Validator/BuildTrigger.php New glob-based validator for branch/path trigger patterns. Supports inclusion, exclusion (!-prefix), single-wildcard (*), and double-wildcard (**) patterns. Logic is correct for individual string matching; the bug lives in how results are aggregated in the caller.
tests/unit/Vcs/Validator/BuildTriggerTest.php Thorough unit tests for BuildTrigger::isValid() in isolation, covering empty patterns, inclusions, exclusions, wildcards, and mixed cases. Missing integration-style tests for the aggregate path-matching behavior in isResourceBuildable where the AND-vs-OR logic error resides.
src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php Wires providerAffectedFiles into both the push and pull-request deployment paths. For PRs, getPullRequestFiles is called before the repository lookup, resulting in an unnecessary GitHub API call when no repositories are connected.
src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php Fetches PR files via getPullRequestFiles and passes them as $providerAffectedFiles to createGitDeployments. The implementation looks correct in isolation; the $owner variable is already resolved from the installation before this call.
app/config/collections/projects.php Adds providerBranches and providerPaths string-array attributes to two resource collection schemas (functions and sites). Schema changes look correct and consistent.
composer.json Pins utopia-php/vcs to the development branch alias dev-ser-401 as 3.0.99. Acceptable for local development but should be replaced with a stable release tag before merging into the 1.9.x release branch.
composer.lock Updated to reflect the dev-branch pin for utopia-php/vcs. Also downgrades plugin-api-version from 2.9.0 to 2.6.0, indicating the developer's local Composer is older than what was used to generate the previous lock file.

Reviews (1): Last reviewed commit: "remove default" | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit d924072 - 2 flaky tests
Test Retries Total Time Details
UsageTest::testVectorsDBStats 1 10.61s Logs
RealtimeCustomClientQueryTest::testDatabaseChannelWithQuery 1 39.44s Logs
Commit c925ad8 - 5 flaky tests
Test Retries Total Time Details
UsageTest::testVectorsDBStats 1 10.06s Logs
DocumentsDBCustomServerTest::testTimeout 1 120.43s Logs
LegacyConsoleClientTest::testTimeout 1 121.40s Logs
LegacyCustomClientTest::testTimeout 1 120.93s Logs
LegacyCustomServerTest::testInvalidDocumentStructure 1 240.70s Logs
Commit 0bbe82a - 2 flaky tests
Test Retries Total Time Details
UsageTest::testVectorsDBStats 1 10.43s Logs
DatabaseServerTest::testUpdateRow 1 241.28s Logs
Commit a8452db - 5 flaky tests
Test Retries Total Time Details
LegacyConsoleClientTest::testListDocumentsWithCache 1 948ms Logs
LegacyCustomClientTest::testListIndexes 1 240.77s Logs
LegacyCustomClientTest::testDocumentsListQueries 1 4ms Logs
LegacyCustomServerTest::testAttributeResponseModels 1 243.06s Logs
UsageTest::testVectorsDBStats 1 10.03s Logs

Copy link
Copy Markdown
Contributor

@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: 3

🧹 Nitpick comments (2)
src/Appwrite/Vcs/Validator/BuildTrigger.php (1)

7-10: Document the trigger grammar on the validator.

This class now defines reusable behavior (!, *, **, empty-pattern fallback, precedence), but none of that is discoverable from the class signature. A short class/constructor docblock will save callers from reverse-engineering the contract from tests.

As per coding guidelines "Include comprehensive PHPDoc comments."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Appwrite/Vcs/Validator/BuildTrigger.php` around lines 7 - 10, Add a
PHPDoc block to the BuildTrigger class/constructor documenting the trigger
grammar and semantics so callers don't need to inspect tests: describe the
accepted pattern tokens and their meanings (e.g., '!' prefix for negation, '*'
for single-segment wildcard, '**' for multi-segment wildcard), explain the
empty-pattern fallback behavior and pattern precedence/resolution rules, and
note that the constructor takes an array of patterns via the private readonly
array $patterns parameter; place this docblock immediately above the class
declaration or constructor (BuildTrigger::__construct) to satisfy the "Include
comprehensive PHPDoc comments" guideline.
composer.json (1)

87-87: Please pin utopia-php/vcs to an immutable revision before merge.

dev-ser-401 as 3.0.99 still follows a movable branch head, so a fresh dependency resolution can install code that differs from what this PR was validated against. For a 1.9.x branch, a tag or exact locked revision is much safer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` at line 87, The composer.json entry for utopia-php/vcs uses a
movable branch ("dev-ser-401 as 3.0.99"); replace it with an immutable reference
(either an exact package tag like "3.0.99" or a branch pinned to a commit SHA
using "dev-ser-401#<commit-hash>" or the exact tag) so the dependency cannot
drift, update composer.lock by running composer update for that package, and
commit the updated composer.json and composer.lock; target the "utopia-php/vcs"
dependency string in composer.json to make this change.
🤖 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/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php`:
- Around line 544-552: The path-trigger logic currently rejects the deployment
as soon as any affected file does not match, but it should accept the resource
if any affected file matches the BuildTrigger; update the loop that iterates
$providerAffectedFiles using the BuildTrigger $pathTrigger so that it returns
true immediately when $pathTrigger->isValid($file) is true (or sets a match
flag) and only calls Span::add(... 'path') and returns false if no files matched
after the loop completes; ensure Span::add is moved to the "no match" branch so
we only log a skip reason when nothing matched.

In `@src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php`:
- Around line 215-216: The current use of array_column($prFiles, 'filename')
only captures new paths and misses renamed files' old paths; update the logic
that builds $providerAffectedFiles (after calling getPullRequestFiles and where
$prFiles is available) to collect both 'filename' and, when present,
'previous_filename' for each entry (e.g., loop over $prFiles, push both values
if non-empty, then array_unique the result) so renamed files match filters;
apply the same change in the corresponding Update handler where
$prFiles/$providerAffectedFiles are built.

In `@src/Appwrite/Vcs/Validator/BuildTrigger.php`:
- Around line 21-41: isValid() currently returns true immediately on the first
inclusion match, allowing excluded paths to slip through; change it so
exclusions veto inclusions: in the isValid() method (which uses $this->patterns,
matchGlob(), and the include/exclude arrays) first collect include and exclude
patterns as you do now, then when an inclusion pattern matches set a flag (e.g.
$matched = true) but do not return; after checking inclusions, iterate excludes
(using substr($pattern,1) or similar) and if any exclusion matches return false;
finally return $matched || empty($include). Ensure matchGlob() is used unchanged
and update logic near getDescription() to respect this veto behavior.

---

Nitpick comments:
In `@composer.json`:
- Line 87: The composer.json entry for utopia-php/vcs uses a movable branch
("dev-ser-401 as 3.0.99"); replace it with an immutable reference (either an
exact package tag like "3.0.99" or a branch pinned to a commit SHA using
"dev-ser-401#<commit-hash>" or the exact tag) so the dependency cannot drift,
update composer.lock by running composer update for that package, and commit the
updated composer.json and composer.lock; target the "utopia-php/vcs" dependency
string in composer.json to make this change.

In `@src/Appwrite/Vcs/Validator/BuildTrigger.php`:
- Around line 7-10: Add a PHPDoc block to the BuildTrigger class/constructor
documenting the trigger grammar and semantics so callers don't need to inspect
tests: describe the accepted pattern tokens and their meanings (e.g., '!' prefix
for negation, '*' for single-segment wildcard, '**' for multi-segment wildcard),
explain the empty-pattern fallback behavior and pattern precedence/resolution
rules, and note that the constructor takes an array of patterns via the private
readonly array $patterns parameter; place this docblock immediately above the
class declaration or constructor (BuildTrigger::__construct) to satisfy the
"Include comprehensive PHPDoc comments" guideline.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 14a7367c-f85b-42e7-9dfc-0353f49aaf85

📥 Commits

Reviewing files that changed from the base of the PR and between d4f7d51 and fc0f19b.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • app/config/collections/projects.php
  • composer.json
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php
  • src/Appwrite/Vcs/Validator/BuildTrigger.php
  • tests/unit/Vcs/Validator/BuildTriggerTest.php

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

✨ Benchmark results

  • Requests per second: 1,562
  • Requests with 200 status code: 281,296
  • P99 latency: 0.110487587

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,562 1,093
200 281,296 196,753
P99 0.110487587 0.208419132

@blacksmith-sh

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@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)
src/Appwrite/Vcs/Validator/BuildTrigger.php (1)

1-9: Add strict type declaration and PHPDoc comment.

The file is missing declare(strict_types=1); and class-level documentation.

Suggested fix
 <?php
+
+declare(strict_types=1);
 
 namespace Appwrite\Vcs\Validator;
 
 use Utopia\Validator;
 
+/**
+ * Validates values against glob-based inclusion/exclusion patterns.
+ *
+ * Specific patterns (no wildcards) take precedence over wildcard patterns.
+ * Exclusions (prefixed with !) can veto inclusions at the same specificity level.
+ */
 class BuildTrigger extends Validator
 {

As per coding guidelines: "Use strict type declarations where applicable" and "Include comprehensive PHPDoc comments".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Appwrite/Vcs/Validator/BuildTrigger.php` around lines 1 - 9, Add a strict
types declaration and a PHPDoc block to the BuildTrigger class: insert
declare(strict_types=1); after the opening <?php and add a class-level PHPDoc
above class BuildTrigger describing purpose, constructor parameters (array
$patterns) and visibility/immutability, and annotate the constructor property
(patterns) with its type in the PHPDoc so tools and readers understand intent;
ensure the constructor signature remains public function __construct(private
readonly array $patterns) {} and update any doc tags (e.g., `@param` array<string>
$patterns) to match expected pattern types.
🤖 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/Appwrite/Vcs/Validator/BuildTrigger.php`:
- Around line 52-57: The wildcard-inclusion loop in BuildTrigger prematurely
returns true and ignores wildcard exclusions; update the logic so that when a
wildcard include (in $include, detected via !$isSpecific($pattern) &&
$this->matchGlob($value, $pattern)) matches, do not immediately return true but
instead check $exclude for any matching wildcard exclusion
($this->matchGlob($value, $exPattern) && !$isSpecific($exPattern)) and only
accept the include if no such wildcard exclusion matches (while preserving
existing behavior that any specific exclusion ($isSpecific) still overrides
inclusions); adjust the comment to reflect that wildcard exclusions will now
refine wildcard inclusions and keep using $isSpecific, $include, $exclude,
matchGlob and the surrounding method in BuildTrigger to locate the change.

---

Nitpick comments:
In `@src/Appwrite/Vcs/Validator/BuildTrigger.php`:
- Around line 1-9: Add a strict types declaration and a PHPDoc block to the
BuildTrigger class: insert declare(strict_types=1); after the opening <?php and
add a class-level PHPDoc above class BuildTrigger describing purpose,
constructor parameters (array $patterns) and visibility/immutability, and
annotate the constructor property (patterns) with its type in the PHPDoc so
tools and readers understand intent; ensure the constructor signature remains
public function __construct(private readonly array $patterns) {} and update any
doc tags (e.g., `@param` array<string> $patterns) to match expected pattern types.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 270e9e08-4947-4403-aa26-00cd18a291f3

📥 Commits

Reviewing files that changed from the base of the PR and between d924072 and c925ad8.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Deployment.php
  • src/Appwrite/Vcs/Validator/BuildTrigger.php
  • tests/unit/Vcs/Validator/BuildTriggerTest.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unit/Vcs/Validator/BuildTriggerTest.php

@blacksmith-sh

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@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: 2

🧹 Nitpick comments (2)
tests/unit/Vcs/Validator/BuildTriggerTest.php (1)

181-188: Misleading test comment at line 186.

The comment // excluded even if inclusion didn't match is misleading. When 'develop' is passed to isValid() with patterns ['main', '!develop'], it returns false because no inclusion pattern matches (falls through to line 61: "No inclusion matched"), not because the exclusion blocked it. The exclusion check only runs for values that could match a wildcard inclusion.

The test passes for the correct reason, but the comment suggests a different code path.

📝 Suggested comment fix
     public function testInclusionWithNoMatchFails(): void
     {
         // Inclusions exist but none match — exclusion is irrelevant
         $validator = new BuildTrigger(['main', '!develop']);
         $this->assertTrue($validator->isValid('main'));
-        $this->assertFalse($validator->isValid('develop'));  // excluded even if inclusion didn't match
+        $this->assertFalse($validator->isValid('develop'));  // no inclusion matches — exclusion is not evaluated
         $this->assertFalse($validator->isValid('staging')); // no inclusion match
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/Vcs/Validator/BuildTriggerTest.php` around lines 181 - 188, Update
the misleading inline comment in the test method testInclusionWithNoMatchFails:
change the comment on the assertion for $validator->isValid('develop') so it
states that 'develop' is false because no inclusion pattern matched (the
validator falls through to the "no inclusion matched" branch in
BuildTrigger::isValid), not because the exclusion '!develop' blocked it; keep
the rest of the assertions unchanged and reference BuildTrigger and isValid to
indicate the source of truth.
src/Appwrite/Vcs/Validator/BuildTrigger.php (1)

1-12: Consider adding strict type declaration and PHPDoc.

The class implementation is solid. For consistency with PHP best practices and the coding guidelines recommending strict type declarations, consider adding the strict types declaration and comprehensive PHPDoc.

📝 Suggested improvements
 <?php
+
+declare(strict_types=1);

 namespace Appwrite\Vcs\Validator;

 use Utopia\Validator;

+/**
+ * Validates a string against a list of glob-based include/exclude patterns.
+ *
+ * Supports wildcards: * (single segment), ? (single char), ** (multi-segment).
+ * Exclusions are prefixed with '!'. Specific inclusions take precedence over
+ * exclusions; exclusions override wildcard inclusions.
+ */
 class BuildTrigger extends Validator
 {
+    /**
+     * `@param` array<string> $patterns List of glob patterns (prefix with ! to exclude)
+     */
     public function __construct(private readonly array $patterns)
     {
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Appwrite/Vcs/Validator/BuildTrigger.php` around lines 1 - 12, Add a
strict types declaration at the top of the file and provide PHPDoc for the
BuildTrigger class and its constructor to document the $patterns array shape and
purpose (e.g., `@var` array<string> $patterns and a short description),
referencing the BuildTrigger class and its __construct method so editors and
static analyzers pick up the intent and types.
🤖 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/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php`:
- Around line 136-142: The code builds $providerAffectedFiles using
array_column($prFiles, 'filename') and array_column($prFiles,
'previous_filename') which yields nulls for non-renamed files; update the
construction of $providerAffectedFiles by filtering out null/empty values from
the previous_filename array (and optionally deduplicating) before passing it
into createGitDeployments so path matching isn't polluted. Locate $prFiles and
$providerAffectedFiles in Update.php and replace the raw array_column(...) merge
with a step that removes nulls (e.g., array_filter) from the previous_filename
results and then merge/unique the lists prior to calling createGitDeployments.

In `@src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php`:
- Around line 215-219: The array construction for $providerAffectedFiles
includes array_column($prFiles, 'previous_filename') which yields null entries
for non-renamed files; update the code that builds $providerAffectedFiles (the
block using $prFiles and $providerAffectedFiles) to filter out null/empty values
from the previous_filename results before merging (e.g., map/filter the
array_column output or array_filter the merged array) so only valid filenames
are included; ensure you still include both current 'filename' and any non-null
'previous_filename' values.

---

Nitpick comments:
In `@src/Appwrite/Vcs/Validator/BuildTrigger.php`:
- Around line 1-12: Add a strict types declaration at the top of the file and
provide PHPDoc for the BuildTrigger class and its constructor to document the
$patterns array shape and purpose (e.g., `@var` array<string> $patterns and a
short description), referencing the BuildTrigger class and its __construct
method so editors and static analyzers pick up the intent and types.

In `@tests/unit/Vcs/Validator/BuildTriggerTest.php`:
- Around line 181-188: Update the misleading inline comment in the test method
testInclusionWithNoMatchFails: change the comment on the assertion for
$validator->isValid('develop') so it states that 'develop' is false because no
inclusion pattern matched (the validator falls through to the "no inclusion
matched" branch in BuildTrigger::isValid), not because the exclusion '!develop'
blocked it; keep the rest of the assertions unchanged and reference BuildTrigger
and isValid to indicate the source of truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5ab391df-c369-43e0-863e-6bb14dd8f20e

📥 Commits

Reviewing files that changed from the base of the PR and between c925ad8 and 0bbe82a.

📒 Files selected for processing (4)
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/External/Update.php
  • src/Appwrite/Platform/Modules/VCS/Http/GitHub/Events/Create.php
  • src/Appwrite/Vcs/Validator/BuildTrigger.php
  • tests/unit/Vcs/Validator/BuildTriggerTest.php

@blacksmith-sh
Copy link
Copy Markdown

blacksmith-sh bot commented Mar 24, 2026

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
› Tests\E2E\Services\TablesDB\DatabasesStringTypesTest/testCreateDatabase View Logs

Fix in Cursor

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