Skip to content

feat: add DeploymentSkippable for commit-message skip detection#99

Closed
HarshMN2345 wants to merge 10 commits into
mainfrom
feat/deployment-skippable
Closed

feat: add DeploymentSkippable for commit-message skip detection#99
HarshMN2345 wants to merge 10 commits into
mainfrom
feat/deployment-skippable

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

@HarshMN2345 HarshMN2345 commented May 12, 2026

Introduces Utopia\VCS\DeploymentSkippable with a static fromCommitMessage(mixed $message): bool method that returns true when a commit message contains a recognised skip directive such as [skip ci], [skip deploy], [no appwrite], etc. Matching is case-insensitive. Non-string input returns false.

Supported directives: [skip ci].

Introduces Utopia\VCS\DeploymentSkippable with a static
fromCommitMessage(mixed $message): bool method that returns true
when a commit message contains a recognised skip directive such as
[skip ci], [skip deploy], [no appwrite], etc. Matching is
case-insensitive. Non-string input returns false.

Supported directives: [skip ci], [ci skip], [no ci],
[skip action], [action skip], [no action], [skip actions],
[actions skip], [no actions], [skip deploy], [deploy skip],
[no deploy], [skip appwrite], [appwrite skip], [no appwrite].
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR introduces Utopia\VCS\Validator\DeploymentSkippable, a validator that detects skip directives in commit messages, and switches the required dependency from the heavyweight utopia-php/framework to the minimal utopia-php/validators. The dependency changes correctly address all previously flagged concerns.

  • DeploymentSkippable extends Utopia\Validator and implements isValid(), getDescription(), isArray(), and getType() correctly — but 14 of the 15 advertised directives are commented out in PATTERNS, leaving only [skip ci] active.
  • The test suite covers the one active directive well, but has no assertions for the other 14 directives mentioned in the PR description and getDescription().

Confidence Score: 4/5

Safe to merge once the commented-out patterns are restored; the validator logic and dependency changes are otherwise correct.

All 14 directives beyond [skip ci] are commented out in PATTERNS, so callers relying on [ci skip], [no deploy], [skip appwrite], and the rest will silently get false instead of true. The discrepancy between the documented contract and the running code is the only functional concern.

src/VCS/Validator/DeploymentSkippable.php — the PATTERNS constant needs the commented-out entries restored before the feature matches its stated behaviour.

Important Files Changed

Filename Overview
src/VCS/Validator/DeploymentSkippable.php New validator extending Utopia\Validator — implementation is correct, but 14 of the 15 declared directives are commented out, making the feature incomplete relative to the PR description.
tests/VCS/Unit/Validator/DeploymentSkippableTest.php Test structure is solid; only covers [skip ci] — needs tests for the other 14 directives once they are uncommented.
composer.json Adds utopia-php/validators ^0.2 as a lightweight replacement for the previously flagged utopia-php/framework dependency; JSON is well-formed.
composer.lock Lock file updated to include utopia-php/validators 0.2.2; utopia-php/telemetry remains at 0.3.0, resolving the previously flagged downgrade risk.

Reviews (7): Last reviewed commit: "refactor: keep only [skip ci] pattern, u..." | Re-trigger Greptile

Comment thread src/VCS/DeploymentSkippable.php Outdated
Comment thread src/VCS/DeploymentSkippable.php Outdated
…inal + private constructor

- fromCommitMessage follows the PHP named-constructor convention and is
  misleading for a bool-returning predicate; isSkippedByCommitMessage
  makes the intent unambiguous
- Mark class final and add a private constructor to prevent meaningless
  instantiation and subclassing
Copy link
Copy Markdown
Contributor

@Meldiron Meldiron May 13, 2026

Choose a reason for hiding this comment

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

In validator folder,

should extend validator

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread composer.json Outdated
Comment thread composer.json Outdated
Comment thread composer.lock Outdated
Comment thread src/VCS/Validator/DeploymentSkippable.php
@Meldiron
Copy link
Copy Markdown
Contributor

Closing in favour of utopia-php/validators#9

@Meldiron Meldiron closed this May 14, 2026
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.

2 participants