From db0247ccf1e67d8830bf16d245c04ae61c705e6d Mon Sep 17 00:00:00 2001 From: Denis Zunke Date: Wed, 28 Oct 2015 13:34:46 +0100 Subject: [PATCH] Give alias to commands for future remove of dzunke namespace --- CHANGELOG | 1 + Command/BotMessagingCommand.php | 1 + Command/ChangeChannelsTopicCommand.php | 1 + Command/DebugCommand.php | 1 + Command/MessageCommand.php | 1 + Command/UsersCommand.php | 1 + Resources/doc/commands.md | 16 ++++++++-------- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c64a1d7..4490db5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ SlackBundle v1.3.0 - Feature: Implement action and service to get details about users on the team - Feature: Implement console command to read userdata from api - Patch: File upload no longer need to lookup channel id due to api changes +- Patch: Set aliases for command names - old names with dzunke: prefix will be removed in the future! SlackBundle v1.2.2 ================== diff --git a/Command/BotMessagingCommand.php b/Command/BotMessagingCommand.php index bc4edac..a0dd2bd 100644 --- a/Command/BotMessagingCommand.php +++ b/Command/BotMessagingCommand.php @@ -22,6 +22,7 @@ protected function configure() { $this ->setName('dzunke:slack:run-bot') + ->setAliases(['slack:run-bot']) ->setDescription('Running the Bot-User to a Channel') ->addArgument( 'channel', diff --git a/Command/ChangeChannelsTopicCommand.php b/Command/ChangeChannelsTopicCommand.php index 4da6472..cd4533a 100644 --- a/Command/ChangeChannelsTopicCommand.php +++ b/Command/ChangeChannelsTopicCommand.php @@ -15,6 +15,7 @@ protected function configure() { $this ->setName('dzunke:slack:channels:topic') + ->setAliases(['slack:channels:topic']) ->setDescription('Changing the Topic of a Channel') ->addOption('discover', 'd', InputOption::VALUE_NONE, 'channel name is given, so discover the id') ->addArgument('channel', InputArgument::REQUIRED, 'an existing channel in your team to change the topic') diff --git a/Command/DebugCommand.php b/Command/DebugCommand.php index d5911cc..98ccaab 100644 --- a/Command/DebugCommand.php +++ b/Command/DebugCommand.php @@ -31,6 +31,7 @@ protected function configure() { $this ->setName('dzunke:slack:debug') + ->setAliases(['slack:debug']) ->setDescription('Gives some Debug Informations about the SlackBundle'); } diff --git a/Command/MessageCommand.php b/Command/MessageCommand.php index 9cdf518..2e2aa84 100644 --- a/Command/MessageCommand.php +++ b/Command/MessageCommand.php @@ -14,6 +14,7 @@ protected function configure() { $this ->setName('dzunke:slack:message') + ->setAliases(['slack:message']) ->setDescription('Sending a Message to a Channel or User') ->addArgument('channel', InputArgument::REQUIRED, 'an existing channel in your team to send to') ->addArgument('username', InputArgument::REQUIRED, 'an username from configured identities to send with') diff --git a/Command/UsersCommand.php b/Command/UsersCommand.php index 03c91aa..5e3cf69 100644 --- a/Command/UsersCommand.php +++ b/Command/UsersCommand.php @@ -14,6 +14,7 @@ protected function configure() { $this ->setName('dzunke:slack:users') + ->setAliases(['slack:users']) ->setDescription('work with the users of your team') ->addOption('only-active', 'a', InputOption::VALUE_NONE, 'lists only active users') ->addOption('only-deleted', 'd', InputOption::VALUE_NONE, 'lists only deleted users') diff --git a/Resources/doc/commands.md b/Resources/doc/commands.md index 7ec7777..822d859 100644 --- a/Resources/doc/commands.md +++ b/Resources/doc/commands.md @@ -5,7 +5,7 @@ Output of Debug Informations like Connection, Identities, Channels etc. ``` bash -php app/console dzunke:slack:debug +php app/console slack:debug ``` ## Messaging @@ -13,8 +13,8 @@ php app/console dzunke:slack:debug Sending a Message directly from Console ``` bash -php app/console dzunke:slack:message @fooUser BazUser "Lorem ipsum dolor sit amet .." -php app/console dzunke:slack:message "#FooChannel" BazUser "Lorem ipsum dolor sit amet .." +php app/console slack:message @fooUser BazUser "Lorem ipsum dolor sit amet .." +php app/console slack:message "#FooChannel" BazUser "Lorem ipsum dolor sit amet .." ``` ## Switch Topic of a Channel @@ -22,10 +22,10 @@ php app/console dzunke:slack:message "#FooChannel" BazUser "Lorem ipsum dolor si You can switch the Topic of a Channel ``` bash -php app/console dzunke:slack:channels:topic "C02GABTDT" "Lorem ipsum dolor sit amet .." +php app/console slack:channels:topic "C02GABTDT" "Lorem ipsum dolor sit amet .." # If you don't have the ChannelId it must be discovered while processing -php app/console dzunke:slack:channels:topic "#foo-channel" "Lorem ipsum dolor sit amet .." -d +php app/console slack:channels:topic "#foo-channel" "Lorem ipsum dolor sit amet .." -d ``` ## Read userdata from api @@ -34,8 +34,8 @@ you will get a table of userdata. ``` bash # Read all users from your team -php app/console dzunke:slack:users +php app/console slack:users # Read a single user -php app/console dzunke:slack:users --user=nameOfTheUser -``` +php app/console slack:users --user=nameOfTheUser +```