Skip to content

Commit ae14546

Browse files
Allow usage within pre-push hooks
1 parent c97b9ee commit ae14546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Hook/Condition/FileChanged.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class FileChanged extends File
3333
*
3434
* @var array<string>
3535
*/
36-
protected $filesToWatch;
36+
protected array $filesToWatch;
3737

3838
/**
3939
* FileChange constructor
@@ -52,7 +52,7 @@ public function __construct(array $files)
5252
*/
5353
public static function getRestriction(): Restriction
5454
{
55-
return Restriction::fromArray([Hooks::POST_CHECKOUT, Hooks::POST_MERGE, Hooks::POST_REWRITE]);
55+
return Restriction::fromArray([Hooks::PRE_PUSH, Hooks::POST_CHECKOUT, Hooks::POST_MERGE, Hooks::POST_REWRITE]);
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)