Skip to content

Instantly share code, notes, and snippets.

@bouzuya
Created April 11, 2014 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bouzuya/10438727 to your computer and use it in GitHub Desktop.
Save bouzuya/10438727 to your computer and use it in GitHub Desktop.
現在のブランチに対応するBacklogチケット件名を表示するスクリプト
#!/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