Created
April 11, 2014 03:03
-
-
Save bouzuya/10438727 to your computer and use it in GitHub Desktop.
現在のブランチに対応するBacklogチケット件名を表示するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 前提: | |
# - git がインストールされている | |
# - backlog-cli がインストールされている | |
# - features/<チケット番号> なブランチで作業している | |
# - <project>/ ディレクトリ配下で作業しており、 | |
# Backlogに<PROJECT>プロジェクトがある | |
project_dir=$(cd $(git rev-parse --show-toplevel);pwd) | |
project=$(basename ${project_dir} | tr '[:lower:]' '[:upper:]') | |
branch_name=$(git symbolic-ref HEAD 2>/dev/null) | |
issue_no=${branch_name##*/} | |
backlog issue info ${project}-${issue_no} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment