function edit_pull_request {
template_dir="/hoge/geho/tmp/pull_request_template"
branch_name=$(git rev-parse --abbrev-ref HEAD)
template_base_path=$(echo "${template_dir}/base.md")
dir=$(echo "${template_dir}/${branch_name}")
path=$(echo "${dir}/template.md")
mkdir -p $dir
if [ ! -f $path ]; then
echo "cp $template_base_path $path"
cp $template_base_path $path
fi
editor $path # use your favorite editor!
}
function send_pull_request {
base_branch=$1
template_dir="/hoge/geho/tmp/pull_request_template"
branch_name=$(git rev-parse --abbrev-ref HEAD)
template_path=$(echo "${template_dir}/${branch_name}/template.md")
echo "git push"
git push
echo "hub pull-request -F $template_path -b $base_branch"
hub pull-request -F $template_path -b $base_branch
}