Skip to content

Commit f5fe2e6

Browse files
committed
Command signature changed to git-hooks
1 parent 74784cf commit f5fe2e6

14 files changed

+15
-15
lines changed

src/Configurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function run(): void
4141
{
4242
foreach ($this->hooksMap as $hook) {
4343
$hookStubPath = __DIR__.'/Console/Commands/stubs/hook';
44-
$command = 'git:'.$hook;
44+
$command = 'git-hooks:'.$hook;
4545

4646
$hookPath = $this->app->basePath('.git/hooks/'.$hook);
4747

src/Console/Commands/CommitMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CommitMessage extends Command implements HookCommand
1717
*
1818
* @var string
1919
*/
20-
protected $signature = 'git:commit-msg {file}';
20+
protected $signature = 'git-hooks:commit-msg {file}';
2121

2222
/**
2323
* The console command description.

src/Console/Commands/PostCommit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PostCommit extends Command implements HookCommand
1919
*
2020
* @var string
2121
*/
22-
protected $signature = 'git:post-commit';
22+
protected $signature = 'git-hooks:post-commit';
2323

2424
/**
2525
* The console command description.

src/Console/Commands/PreCommit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PreCommit extends Command implements HookCommand
1919
*
2020
* @var string
2121
*/
22-
protected $signature = 'git:pre-commit';
22+
protected $signature = 'git-hooks:pre-commit';
2323

2424
/**
2525
* The console command description.

src/Console/Commands/PrePush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PrePush extends Command implements HookCommand
1919
*
2020
* @var string
2121
*/
22-
protected $signature = 'git:pre-push';
22+
protected $signature = 'git-hooks:pre-push';
2323

2424
/**
2525
* The console command description.

src/Console/Commands/PrepareCommitMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PrepareCommitMessage extends Command implements HookCommand
1717
*
1818
* @var string
1919
*/
20-
protected $signature = 'git:prepare-commit-msg {file}';
20+
protected $signature = 'git-hooks:prepare-commit-msg {file}';
2121

2222
/**
2323
* The console command description.

src/Console/Commands/RegisterHooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class RegisterHooks extends Command
1212
*
1313
* @var string
1414
*/
15-
protected $signature = 'git:register-hooks';
15+
protected $signature = 'git-hooks:register-hooks';
1616

1717
/**
1818
* The console command description.

tests/ConfiguratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ public function test_files_for_hooks_should_be_created()
2020
$storage->allows('store')->with('.git/hooks/pre-commit', <<<'EOL'
2121
#!/bin/sh
2222
23-
php /artisan git:pre-commit $@ >&2
23+
php /artisan git-hooks:pre-commit $@ >&2
2424

2525
EOL
2626
);
2727

2828
$storage->allows('store')->with('.git/hooks/post-commit', <<<'EOL'
2929
#!/bin/sh
3030
31-
php /artisan git:post-commit $@ >&2
31+
php /artisan git-hooks:post-commit $@ >&2
3232

3333
EOL
3434
);

tests/Console/Commands/CommitMessageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function test_get_command_name()
2222

2323
$command = new CommitMessage($config, $commitMessageStorage);
2424

25-
$this->assertEquals('git:commit-msg', $command->getName());
25+
$this->assertEquals('git-hooks:commit-msg', $command->getName());
2626
}
2727

2828
public function test_requires_file_argument()

tests/Console/Commands/PostCommitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function test_get_command_name()
1919
$config = $this->makeConfig();
2020
$command = new PostCommit($config);
2121

22-
$this->assertEquals('git:post-commit', $command->getName());
22+
$this->assertEquals('git-hooks:post-commit', $command->getName());
2323
}
2424

2525
public function test_a_message_should_be_send_through_the_hook_pipes()

0 commit comments

Comments
 (0)