Skip to content

Commit 4fc4606

Browse files
committed
Add Repository Configuration Best Practices
1 parent 4137daa commit 4fc4606

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/content/blog/ddev-add-on-maintenance-guide.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,31 @@ Example:
109109

110110
## Repository Configuration Best Practices
111111

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
113137

114138
## Add-on Scripts for Maintenance
115139

0 commit comments

Comments
 (0)