git-issue : CLIでRedmine/Github-issuesのticketをbrows/editできるgitサブコマンド
というのを作ったました。ちょこちょこ機能改善してます。
yuroyoro/git-issue · GitHub
git-issue | RubyGems.org | your community gem host
仕事では、異臭管理システムはRedmineを使っていて、作業はsshでサーバに入ってコード書いてるわけです。
で、次どのチケットやろうか、とか今やってるチケットの細かい仕様どうだっけ?みたいなときに、
いちいちブラウザに切り替えて目的のチケットを検索するのタルすぎて死ねる。
もうターミナルから離れたくないんだ俺は。
そこで、'git issue 1000'ってやると1000番のチケットを見ることができるようにした。
$ git issue 15 [open] #15 Issueをadd/updateするときに引数で全部渡すのタルい -------------------------------------------------------------------------------- yuroyoro opened this issue Tue Feb 28 03:38:17 UTC 2012 comments : 0 votes : position : labels : html_url : https://github.com/yuroyoro/git-issue/issues/15 updated_at : Tue Feb 28 03:38:17 UTC 2012 -----------------------------
'git issue list'ってやると一覧な。
$ git issue list #4 open tracとか yuroyoro c:0 v:0 p:0 2012/02/17 2012/02/17 #12 open proxy環境下での利用についてもそっと何とか汁 yuroyoro c:0 v:0 p:0 2012/02/24 2012/02/24 #15 open Issueをadd/updateするときに引数で全部渡すのタルい yuroyoro c:0 v:0 p:0 2012/02/28 2012/02/28
pull requestを送ってくれた皆さんありがとう!
setup
'gem install git-issue'で入る。あとは、 README読んでくれ。
usage
git issue helpでコマンドとオプションの一覧が出てくる。RedmineとGithubで微妙にコマンドやオプションが違うので注意。以下は、Githubの場合
git issue <command> [ticket_id] [<args>]
Commnads:
show s show given issue summary. if given no id, geuss id from current branch name.
list l listing issues.
mine m display issues that assigned to you.
commit c commit with filling issue subject to messsage.if given no id, geuss id from current branch name.
add a create issue.
update u update issue properties. if given no id, geuss id from current branch name.
branch b checout to branch using specified issue id. if branch dose'nt exisits, create it. (ex ticket/id/<issue_id>)
publish pub push branch to remote repository and set upstream
rebase rb rebase branch onto specific newbase
help h show usage.
mention men create a comment to given issue
Options:
-a, --all update all paths in the index file
-f, --force force create branch
-v, --verbose show issue details
-n, --max-count=VALUE maximum number of issues
--oneline display short info
--raw-id output ticket number only
--remote=VALUE on publish, remote repository to push branch
--onto=VALUE on rebase, start new branch with HEAD equal to "newbase"
--debug debug print
-s, --supperss_commentsc show issue journals
--title=VALUE Title of issue.Use the given value to create/update issue.
--body=VALUE Body content of issue.Use the given value to create/update issue.
--state=VALUE Use the given value to create/update issue. or query of listing issues.Where 'state' is either 'open' or 'closed'
--milestone=VALUE Use the given value to create/update issue. or query of listing issues, (Integer Milestone number)
--assignee=VALUE Use the given value to create/update issue. or query of listing issues, (String User login)
--mentioned=VALUE Query of listing issues, (String User login)
--labels=VALUE Use the given value to create/update issue. or query of listing issues, (String list of comma separated Label names)
--sort=VALUE Query of listing issues, (created, updated, comments, default: created)
--direction=VALUE Query of listing issues, (asc or desc, default: desc.)
--since=VALUE Query of listing issue, (Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)
--password=VALUE For Authorizaion of create/update issue. Github API v3 does'nt supports API token base authorization for now. then, use Basic Authorizaion instead token.
--sslnoverify don't verify SSL基本的な使い方は以下の通り。
- 'git issue
'でチケットの詳細が表示される。 - 'git issue list'で一覧表示。
- 'git issue add'でチケット登録。内容は、コマンドライン引数でオプションで渡すなどしてくれ。
- 'git issue update
'で更新する。

