This repository has commands I use for making stuff easier for myself.
To make this use full add ~/utility_commands/bin
to your PATH
.
- cibot-pull: Copies command to clipboard that is used to make a pull request for CIBot.
- git_rm_local: Removes all local branches that are safe to remove.
- push-origin: Alias for
git push origin CURRENT_BRANCH
. - branch-commit: Alias for
git commit -m "BRANCH_NAME - MESSAGE"
, whereMESSAGE
is passed as a command line string. - git-attempt-recovery: This is an alias for an awesome command. It makes it easy to track down "lost" commits in your git repository. Useful if you've deleted something by accident and want to find it again. Alias command:
git fsck --unreachable | grep commit | cut -d\ -f3 | xargs git log --merges --no-walk --grep=WIP
- hipchat-message: This allows you to send a message to hipchat see below for setup and example.
slack-message
allows you to send a message to a slack channel. Hard coded
to internal c2fo slack for now.
- The python requests library. (
pip install requests
) - An environment variable
C2FO_SLACK_CIBOT_TOKEN
. You can generate that here - Pass a message to the command:
echo "testing the cli" | slack-message
The hipchat-message command requires the following:
- The python requests library. (
pip install requests
) - An environment variable
HIPCHAT_MESSAGE_TOKEN
. You can generate that here - Pass a message to the command:
echo "testing the cli" | hipchat-message
The cibot-pull
command will work based on the teams in the file. There are two team options. It defauls to using the first team. Also, you can sepcify a branch.
cibot-pull
-- does the pull against develop with the default teamcibot-pull BRANCH
-- does the branch with default teamcibot-pull BRANCH whole_team
does the branch with the devops and teamcibot-pull BRANCH devops
-- does the branch with devops team
Right now the room is hardcoded to where I want to post my automated messages. If you work at C2FO this may work well for you too.
Command I actually use:
cibot-pull | hipchat-message
Or
cibot-pull | slack-message