Redmine へチケットを起票するボタンを追加

chktime のタスクと git 履歴から下書きを作り、まとめて Redmine へ登録できる
ようにした。外部通信はこの機能を使ったときだけで、使わなければ従来どおり
ローカルの jsonl を読むだけ。

- Redmine の REST API を叩く最小クライアント (標準ライブラリのみ)
- 下書きは「タスクから」(1タスク=1チケット) と「git 履歴から」
  (日ごと / 日 x 種別 / 期間一括) の 2 系統
- 起票は件数 x 間隔ぶん時間がかかるのでジョブにし、進捗だけ見に行く
- 作成時の status_id は Redmine 側で無視されるため、作成後に付け直す
- 連続アクセスに 403 を返すサーバがあるので 1 件ごとに間隔をあける (既定 7 秒)
- 自己署名証明書が普通なので、既定は証明書の検証なし
- API キーは redmine.json に置き、git 管理外にする

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-02 13:55:46 +09:00
co-authored by Claude Opus 5
parent d23bcabd76
commit a458509014
7 changed files with 1021 additions and 5 deletions
+18
View File
@@ -14,9 +14,27 @@
<label class="chk"><input type="checkbox" id="relative"> 経過時間で表示</label>
<label class="chk"><input type="checkbox" id="follow"> 自動追従</label>
<span id="follow-state" class="fstate"></span>
<button id="redmine" title="Redmine にチケットを起票する">Redmine へ起票</button>
<button id="reload" title="キャッシュを破棄して再読込">再読込</button>
</header>
<div id="rm-back" class="modal-back hidden">
<div class="modal">
<div class="modal-head">
<span>Redmine へ起票</span>
<span class="spacer"></span>
<span id="rm-conn" class="fstate"></span>
<button id="rm-close" title="閉じる">✕</button>
</div>
<div class="modal-body" id="rm-body"></div>
<div class="modal-foot">
<span id="rm-msg" class="note"></span>
<span class="spacer"></span>
<button id="rm-run" class="go">起票する</button>
</div>
</div>
</div>
<main>
<nav id="projects" class="pane">
<div class="pane-head">プロジェクト</div>