Skip to content

This repository has commands I use for making stuff easier for myself.

License

Notifications You must be signed in to change notification settings

garrypolley/utility_commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

utility_commands

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", where MESSAGE 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 slack

Setup

slack-message

slack-message allows you to send a message to a slack channel. Hard coded to internal c2fo slack for now.

  1. The python requests library. (pip install requests)
  2. An environment variable C2FO_SLACK_CIBOT_TOKEN. You can generate that here
  3. Pass a message to the command: echo "testing the cli" | slack-message

hipchat-message

The hipchat-message command requires the following:

  1. The python requests library. (pip install requests)
  2. An environment variable HIPCHAT_MESSAGE_TOKEN. You can generate that here
  3. Pass a message to the command: echo "testing the cli" | hipchat-message

cibot-pull

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 team
  • cibot-pull BRANCH -- does the branch with default team
  • cibot-pull BRANCH whole_team does the branch with all the teams on the PR
  • cibot-pull BRANCH devops -- does the branch with devops team

Teams that can be used:

  • team
  • app_team -- tpf_team and team
  • devops
  • whole_team -- does all the defined teams together

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

About

This repository has commands I use for making stuff easier for myself.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages