@@ -109,7 +109,31 @@ Example:
109
109
110
110
# # Repository Configuration Best Practices
111
111
112
- _(Coming soon : this section will cover recommended GitHub settings for merging pull requests and default branch restrictions.)_
112
+ To keep your add-on repository tidy, safe, and aligned with community standards, consider adjusting the following GitHub settings :
113
+
114
+ # ## General Settings
115
+
116
+ Go to **Settings → General** in your repository :
117
+
118
+ - Uncheck features you don’t use, such as **Wikis**, **Discussions**, and **Projects**
119
+ - Enable **Allow squash merging** with **Pull request title**
120
+ - Disable **Allow merge commits** and **Allow rebase merging**
121
+ - Enable **Always suggest updating pull request branches**
122
+ - Enable **Automatically delete head branches**
123
+
124
+ # ## Branch Protection Rules
125
+
126
+ Go to **Settings → Rules → Rulesets** :
127
+
128
+ 1. Click **New ruleset → New branch ruleset**
129
+ 2. Set **Ruleset name** to `main`
130
+ 3. Under **Enforcement status**, select **Active**
131
+ 4. Under **Targets**, click **Add target** → choose **Include default branch**
132
+ 5. Under **Rules**, enable :
133
+ - **Restrict deletions**
134
+ - **Require a pull request before merging** (set **Allowed merge methods** to only **Squash**)
135
+ - **Block force pushes**
136
+ 6. Click **Create** to apply the ruleset
113
137
114
138
# # Add-on Scripts for Maintenance
115
139
0 commit comments