Skip to content

feat(auto-fixer): 1回あたりの実行におけるPR処理件数の制限機能を追加#54

Merged
HappyOnigiri merged 2 commits intomainfrom
feat/add-pr-processing-limit
Mar 11, 2026
Merged

feat(auto-fixer): 1回あたりの実行におけるPR処理件数の制限機能を追加#54
HappyOnigiri merged 2 commits intomainfrom
feat/add-pr-processing-limit

Conversation

@HappyOnigiri
Copy link
Owner

@HappyOnigiri HappyOnigiri commented Mar 11, 2026

Summary

  • 1回のツール実行で処理するプルリクエスト(PR)の最大数を制限する機能を導入しました。これにより、CodeRabbit のレート制限回避が容易になります。

Related issues

  • Closes #

Changes

  • max_modified_prs_per_run: 変更(ラベル、コメントなど)を加えるPRの上限(デフォルト 0=無制限)
  • max_committed_prs_per_run: コミットを追加するPRの上限(デフォルト 2)
  • max_claude_prs_per_run: Claude で修正を実行するPRの上限(デフォルト 0=無制限)
  • auto_fixer.py: 設定の読み込み、バリデーション、および PR ループ内での制限・スキップロジックの実装
  • .refix.yaml.sample: 新しい設定オプションの説明と例を追加
  • tests/test_auto_fixer.py: 設定バリデーションおよび PR 処理スキップ動作のテストを追加

Testing

  • make ci を実行し、既存のテストに加え新規追加した12件のテストがすべてパスすることを確認しました。

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.

Summary by CodeRabbit

リリースノート

  • New Features

    • PR処理の実行ごとの上限設定機能を追加しました。修正PR数、コミット数、Claude処理数の各上限を設定可能になります。
  • Tests

    • 新しい設定オプションと上限動作の検証テストを追加しました。

@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: 58310d88-0b90-47e0-8c1c-28cf12d5545c

📥 Commits

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

📒 Files selected for processing (3)
  • .refix.yaml.sample
  • src/auto_fixer.py
  • tests/test_auto_fixer.py

📝 Walkthrough

Walkthrough

このPRは、実行ごとのPR処理上限を設定できる3つの新しい設定オプション(max_modified_prs_per_runmax_committed_prs_per_runmax_claude_prs_per_run)を追加し、これらを実行時に強制するロジックを実装しています。

Changes

Cohort / File(s) Summary
設定ファイルの更新
.refix.yaml.sample
3つの新しいPR上限設定オプション(modified、committed、claude)を追加し、それぞれデフォルト値と説明コメント付きで記載。
メイン処理ロジックの実装
src/auto_fixer.py
新しい設定キーの検証とデフォルト値の設定、実行ごとのカウンター追跡、複数の処理段階での上限チェック(PR処理フィルタリング、CI修正、Claude操作、マージなど)を追加。
テストの追加
tests/test_auto_fixer.py
新しい設定キーの妥当性検証テスト、各上限に対する処理スキップ動作の検証、設定の統合テストを含む包括的なテストスイートを追加。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • CodeRabbit レートリミット対応 #49: src/auto_fixer.pyの設定処理とPR処理フローの変更を通じて関連。新しいトップレベル設定キーの追加と検証、実行時チェックの修正を含む。
  • Draft PR processing configuration #43: src/auto_fixer.pyへの新しい設定オプション追加とPRスキップロジックの変更を通じて関連。追加のスキップ条件が設定と制限によってゲートされている。

Suggested labels

refix:done

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルは新機能の追加内容「1回あたりの実行におけるPR処理件数の制限機能」を明確に示しており、変更セットの主要な目的を正確に反映しています。
Description check ✅ Passed PR説明はテンプレートの全セクションを備えており、サマリー、変更内容、テスト結果、チェックリスト完了が詳細に記載されています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 feat/add-pr-processing-limit

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

@HappyOnigiri HappyOnigiri merged commit 1478593 into main Mar 11, 2026
2 checks passed
@HappyOnigiri HappyOnigiri deleted the feat/add-pr-processing-limit branch March 11, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant