GitHubリポジトリの推奨設定
推奨と言っているが公式が推奨するものではなく、個人的に入れたほうが良いだろうと思う設定を挙げる。
General
Section titled “General”Releases
Section titled “Releases”- Enable release immutability
Pull Requests
Section titled “Pull Requests”- Automatically delete head branches
Branch ruleset
Section titled “Branch ruleset”GitHubでコミットの署名を強制するで書いたように、すべてのブランチに以下を設定する。
- Require signed commits
main ブランチにのみ以下を設定する。おそらくPull Requestを作成する途中で push -f することはあるだろうし、マージ終わったらブランチは削除するだろう。
- Restrict deletion
- Block force pushes
Actions
Section titled “Actions”General
Section titled “General”GitHub Actionsではコミットハッシュでの固定が推奨されるので設定しておくといい。GitHubでのセキュリティ改善対策も関係がある。
- Require actions to be pinned to a full-length commit SHA
便利設定
- Always suggest updating pull request branches