Skip to content

PR ステータス日時表示#52

Merged
HappyOnigiri merged 5 commits intomainfrom
cursor/pr-4a5b
Mar 11, 2026
Merged

PR ステータス日時表示#52
HappyOnigiri merged 5 commits intomainfrom
cursor/pr-4a5b

Conversation

@HappyOnigiri
Copy link
Owner

@HappyOnigiri HappyOnigiri commented Mar 11, 2026

Summary

  • Implemented configurable timezone for PR state comments, defaulting to JST.
  • Changed the state comment header from 処理日時 (UTC) to 処理日時 and updated the timestamp format to include the timezone (e.g., 2026-03-11 13:04:55 JST).

Related issues

  • Closes #

Changes

  • src/state_manager.py: Modified state comment generation to use the specified timezone and updated the header text.
  • src/auto_fixer.py: Added state_comment_timezone to the configuration, with validation for IANA timezones and a default of JST.
  • Documentation (README.md, README.ja.md, .refix.yaml.sample): Updated to describe the new state_comment_timezone setting.
  • Tests: Added and updated unit tests for timezone handling, default JST behavior, and configuration validation.

Testing

  • Verified with make ci (all tests passed).
  • Confirmed new timezone-related tests for state_manager and auto_fixer pass individually.

Checklist

  • I verified the change locally or in CI as appropriate.
  • I added or updated tests when needed.
  • I updated documentation for user-facing changes.
  • I confirmed there are no unintended breaking changes, or documented them clearly.
Open in Web Open in Cursor 

Summary by CodeRabbit

  • 新機能

    • PR状態コメントのタイムスタンプでタイムゾーンを指定できるようになりました(デフォルトは JST)。
  • ドキュメント

    • README(日本語・英語)と設定スキーマに state_comment_timezone の説明、既定値、許容値、例を追記しました。
  • テスト

    • タイムゾーンの既定値・検証・設定反映を確認するテストを追加しました。

Co-authored-by: HappyOnigiri <nodemeld+happy-onigiri@gmail.com>
@cursor
Copy link

cursor bot commented Mar 11, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 382a73e1-9fc1-4294-9877-4ae3bddd220f

📥 Commits

Reviewing files that changed from the base of the PR and between 5b4cc63 and 8f8d0be.

📒 Files selected for processing (7)
  • .refix.yaml.sample
  • README.ja.md
  • README.md
  • src/auto_fixer.py
  • src/state_manager.py
  • tests/test_auto_fixer.py
  • tests/test_state_manager.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/test_state_manager.py
  • README.ja.md

📝 Walkthrough

Walkthrough

PRはPR状態コメントにタイムゾーン指定を導入します。新設定state_comment_timezone(デフォルトJST)を追加し、ドキュメント、設定サンプル、実装、及びテストを更新してタイムゾーン対応を反映します。

Changes

Cohort / File(s) Summary
設定とドキュメント
.refix.yaml.sample, README.ja.md, README.md
トップレベル設定state_comment_timezoneを追加。説明、デフォルト値、例、バリデーション注意をドキュメントとサンプルに追記。YAML例にタイムゾーン項目を反映。
コア機能実装
src/auto_fixer.py, src/state_manager.py
DEFAULT_STATE_COMMENT_TIMEZONEとエイリアス導入、normalize_state_timezone_name/ensure_valid_state_timezone/current_timestampを追加。create_state_entrytimezone_name引数を追加し、設定検証とタイムゾーン引き渡しを実装。既存UTC固定の処理をタイムゾーン対応へ置換。
テスト
tests/test_auto_fixer.py, tests/test_state_manager.py
タイムゾーン検証・デフォルト・明示指定を確認するテストを追加・更新。テストのインポートと期待値をタイムゾーン対応に合わせて修正。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR タイトル「PR ステータス日時表示」は、変更の主要な目的であるタイムゾーン対応の追加を明確に説明しており、実装内容と一致しています。
Description check ✅ Passed PR の説明は必須テンプレートのすべてのセクション(Summary、Related issues、Changes、Testing、Checklist)を完備しており、変更内容が詳細に記載されています。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/pr-4a5b

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/state_manager.py`:
- Line 160: 既存コメントの再描画で旧フォーマットの日時がタイムゾーン不明になる問題は、load_state_comment() /
parse_state_entries() 内で既存エントリの processed_at が文字列でかつ "YYYY-MM-DD HH:MM:SS"
のようにタイムゾーン表示が無い場合に移行処理を挟んで UTC 表示を補完することで解決してください;具体的には
parse_state_entries()/load_state_comment() が読み込む際に processed_at
を検査し、タイムゾーン情報が無ければ "(UTC)" を付与するか ISO 8601 形式で UTC を明示するよう正規化してから再描画(ヘッダーの "|
Comment ID | 処理日時 |" に合わせる)するように実装してください。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7e5c923c-cadf-4212-9418-64d4cabbe2a4

📥 Commits

Reviewing files that changed from the base of the PR and between d03a8d9 and 0bcf235.

📒 Files selected for processing (7)
  • .refix.yaml.sample
  • README.ja.md
  • README.md
  • src/auto_fixer.py
  • src/state_manager.py
  • tests/test_auto_fixer.py
  • tests/test_state_manager.py

Co-authored-by: HappyOnigiri <nodemeld+happy-onigiri@gmail.com>
@HappyOnigiri HappyOnigiri marked this pull request as ready for review March 11, 2026 20:40
…d max_*_prs_per_run

Resolve conflicts by retaining both the state_comment_timezone feature
from PR #52 and the max_modified/committed/claude_prs_per_run settings
introduced in origin/main.
@HappyOnigiri HappyOnigiri added the refix:running Refix is currently processing review fixes. label Mar 11, 2026
Old processed_at values stored as "YYYY-MM-DD HH:MM:SS" (no tz suffix)
are ambiguous when rendered alongside new "... JST/UTC" entries. Add
_normalize_legacy_processed_at() to append " UTC" to bare timestamps
in parse_state_entries(), matching the old implicit UTC assumption.
@HappyOnigiri
Copy link
Owner Author

🤖 Auto Review Fixer Status

処理済みレビュー一覧 (System Use Only)
Comment ID 処理日時 (UTC)
r3930743536 2026-03-11 21:27:20
discussion_r2919393644 2026-03-11 21:27:21

@HappyOnigiri HappyOnigiri added refix:done Refix finished review checks/fixes for now. and removed refix:running Refix is currently processing review fixes. labels Mar 11, 2026
@HappyOnigiri HappyOnigiri merged commit 768900d into main Mar 11, 2026
2 checks passed
@HappyOnigiri HappyOnigiri deleted the cursor/pr-4a5b branch March 11, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refix:done Refix finished review checks/fixes for now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants