redmineをシェルで操作の履歴
PHPで自分担当を取得
<?php $key= 'hogehoge'; $limit = 30; $assigned = 83; $e = file_get_contents('https://example.com/issues.json?status_id=open&key='.$key.'&limit='.$limit.'&assigned_to_id='.$assigned); $xs = json_decode($e)->issues; $c = 1; foreach($xs as $x){ $f = ''; if($x->author->id != $x->assigned_to->id){ $f = ' from '.$x->author->name; } echo zero($c).'. '.$x->subject.$f."\n"; $c++; } function zero($n){ if($n < 10){ return '0'.$n; }else{ return $n; } }
~/.bashrcに
alias re='clear; php ~/redmine.php
とかってしておくといい感じ