feat: add DeploymentSkippable for commit-message skip detection#99
feat: add DeploymentSkippable for commit-message skip detection#99HarshMN2345 wants to merge 10 commits into
Conversation
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 SummaryThis PR introduces
Confidence Score: 4/5Safe 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
Reviews (7): Last reviewed commit: "refactor: keep only [skip ci] pattern, u..." | Re-trigger Greptile |
…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
There was a problem hiding this comment.
In validator folder,
should extend validator
There was a problem hiding this comment.
|
Closing in favour of utopia-php/validators#9 |
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].