Skip to content

Conversation

@amotarao
Copy link
Member

@amotarao amotarao commented Jan 31, 2026

概要

  • Core branches (main/dev) の保護ルールセットを追加

変更内容

  • ブランチの削除を禁止
  • Force push を禁止
  • PR 必須(承認数は0でOK)
  • マージ方法は通常の merge のみ許可

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • リポジトリ保護ルールを追加しました。main・devなどの主要ブランチを保護し、ブランチ削除や強制プッシュを防止します。プルリクエストは指定のマージ方式のみに制限され、レビュー要件(必要承認数・コードオーナー承認・最後のプッシュ承認など)は無効になります。

✏️ Tip: You can customize this high-level summary in your review settings.

Core branches (main/dev) の保護ルールセットを追加。
- ブランチの削除を禁止
- Force push を禁止
- PR 必須(承認数は0でOK)
- マージ方法は通常の merge のみ許可

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Walkthrough

GitHub リポジトリに新しいルールセット設定ファイルを追加し、maindev、およびデフォルトブランチを対象に削除と非高速フォワードを防止、プルリクエストはマージ方式のみ許可する設定を追加しました(バイパスアクター無し)。

Changes

Cohort / File(s) Summary
GitHub ルールセット設定
github/rulesets/core-branches-protectionruleset.json
新規ファイル追加。リフ名条件に maindevdefault を指定。ブランチ削除禁止と非高速フォワード防止を有効化。プルリクエストはマージ方法のみ許可、レビュー要件は全て 0(承認不要、コードオーナー不要、最後のプッシュ承認不要)。バイパスアクターは未設定(空)。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 分

Poem

🐰✨ 新しいルールで枝を守る、
main と dev に優しい鍵、
マージだけで道を通し、
バイパスなしで安全に、
ホップと喜びの跳躍! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、コアブランチ保護のためのGitHubルールセット追加という主要な変更を明確に要約しています。
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-github-rulesets

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

Copy link

@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

🤖 Fix all issues with AI agents
In `@github/rulesets/core-branches-protectionruleset.json`:
- Around line 2-6: The JSON includes response-only fields and is missing a
required enforcement field: remove "id", "source", and "source_type" from the
request payload used with the GitHub Rulesets API (they are returned by GitHub,
not sent), ensure when updating you provide the ruleset id in the URL path
rather than in the body, and add the mandatory "enforcement" property with one
of the allowed values ("disabled", "active", or "evaluate") to the ruleset
object (refer to the "id", "source_type", "source" keys and the "enforcement"
field in this file for where to apply the changes).

amotarao and others added 4 commits January 31, 2026 17:00
Remove id, source_type, and source fields which are returned by GitHub API but should not be included in request payloads.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@amotarao amotarao merged commit c14d707 into main Jan 31, 2026
2 checks passed
@amotarao amotarao deleted the add-github-rulesets branch January 31, 2026 08:10
amotarao added a commit that referenced this pull request Jan 31, 2026
PR #1 の修正: ファイル名を protectionruleset から protection-ruleset に変更

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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