fix: pre-production/production ブランチ保護のデフォルト設定を差別化 - #583
Conversation
cloud_provisioning PR #359 と同様に、ブランチ種別ごとのデフォルト保護を適用: - main: enforce_admins=true, reviews=0, code_owner_reviews=false - pre-production/production: enforce_admins=false, reviews=1, code_owner_reviews=true --uniform オプションで従来の全ブランチ同一設定に切替可能 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request adds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項(重要度順)
判定: patch is incorrect
|
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項(重大度順)
総合判定: patch is incorrect
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af5cacb22c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| enforce_admins=false | ||
| reviewers=1 |
There was a problem hiding this comment.
Honor explicit protection flags over branch defaults
When --uniform is not set, the branch-type case block hard-codes enforce_admins/reviewers for pre-production and production, which silently overrides explicit CLI inputs like --enforce-admins and --reviewers. For example, running with --enforce-admins --branches production still produces enforce_admins=false, so admins remain exempt even though the caller asked to enforce rules for them. This is a regression from prior behavior and can apply weaker protection than requested.
Useful? React with 👍 / 👎.
コードレビュー全体的に変更の意図が明確で、既存パターン( ✅ 良い点
🔍 指摘事項1.
|
| 分類 | 評価 |
|---|---|
| コード品質 | ✅ シンプルで読みやすい |
| バグリスク | require_code_owner_reviews の初期値(軽微) |
| 後方互換性 | master ブランチのデフォルト変更 |
| テスト | ✅ Integration Tests パス |
| ドキュメント | ✅ 同期更新済み |
LGTM です。指摘の #1(初期値修正)のみ対応いただけると完璧です。
🤖 Claude Code レビュー
|
🎉 This PR is included in version 1.97.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
setup-team-protection.shにブランチ種別ごとのデフォルト保護設定を追加cloud_provisioningPR fix: add bash-compatible short aliases to output.sh #359 と同パターンでpre-production/productionを保護--uniformオプションで従来の全ブランチ同一設定に切替可能変更後のデフォルト保護
Test plan
--dry-runで main / pre-production / production それぞれに適切なデフォルトが適用されることを確認--uniformで全ブランチ同一設定になることを確認--protection-level strictがブランチ種別デフォルトより優先されることを確認🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
--uniformflag to apply identical branch protection settings across all branchesDocumentation