|
37 | 37 | 4. **Configure repository settings** (recommended): |
38 | 38 |
|
39 | 39 | **Pull Request Settings** (Settings → General → Pull Requests): |
40 | | - - ✅ Always suggest updating pull request branches |
41 | | - - ✅ Allow auto-merge |
42 | | - - ✅ Automatically delete head branches |
43 | | - - ✅ Auto-close issues with merged linked pull requests |
44 | | - - ✅ Allow squash merging + Default to pull request title |
45 | | - - ⚠️ Disable merge commits (for cleaner history) |
46 | | - |
47 | | - **GitHub Actions** (Settings → Actions → General → Workflow permissions): |
48 | | - - ✅ Allow GitHub Actions to create and approve pull requests |
49 | | - - ✅ Default GITHUB_TOKEN: Read-only (least privilege) |
50 | | - - ✅ Fork workflows: Require approval for first-time contributors |
51 | | - |
52 | | - **Security Settings** (Settings → Code security and analysis): |
53 | | - - ✅ Dependabot alerts (vulnerability notifications) |
54 | | - - ✅ Dependabot security updates (auto PRs for security issues) |
55 | | - - ❌ **Dependabot version updates - DISABLE** (use Renovate instead) |
56 | | - - ✅ Secret scanning + Push protection |
57 | | - - ✅ Code scanning (CodeQL) |
58 | | - - ✅ Private vulnerability reporting |
| 40 | + - ❌ **Allow merge commits** - DISABLE for cleaner history |
| 41 | + - ✅ **Allow squash merging** - ENABLE |
| 42 | + - Set "Default commit message" to "Default to pull request title" |
| 43 | + - ⚠️ **Allow rebase merging** - Optional (not required) |
| 44 | + - ✅ **Always suggest updating pull request branches** - ENABLE |
| 45 | + - ✅ **Allow auto-merge** - ENABLE |
| 46 | + - ✅ **Automatically delete head branches** - ENABLE |
| 47 | + |
| 48 | + **GitHub Actions** (Settings → Actions → General): |
| 49 | + |
| 50 | + *Workflow permissions:* |
| 51 | + - ✅ **Read repository contents and packages permissions** - SELECT (least privilege) |
| 52 | + - NOT "Read and write permissions" |
| 53 | + - ✅ **Allow GitHub Actions to create and approve pull requests** - ENABLE |
| 54 | + |
| 55 | + *Fork pull request workflows from outside collaborators:* |
| 56 | + - ✅ **Require approval for first-time contributors** - SELECT |
| 57 | + - Or "Require approval for first-time contributors who are new to GitHub" |
| 58 | + |
| 59 | + **Security Settings** (Settings → Security): |
| 60 | + |
| 61 | + *Code security and analysis / Advanced Security:* |
| 62 | + - ✅ **Private vulnerability reporting** - ENABLE |
| 63 | + - ✅ **Dependency graph** - ENABLE (auto-enabled for public repos) |
| 64 | + - ✅ **Dependabot alerts** - ENABLE |
| 65 | + - ✅ **Dependabot security updates** - ENABLE |
| 66 | + - ❌ **Dependabot version updates** - DISABLE (use Renovate instead) |
| 67 | + - ✅ **Code scanning** (CodeQL) - ENABLE with default setup |
| 68 | + - ✅ **Secret scanning** - ENABLE (auto-enabled for public repos) |
| 69 | + - ✅ **Push protection** - ENABLE |
59 | 70 |
|
60 | 71 | **Renovate Setup** (Dependency Management): |
61 | 72 | - Install: https://github.com/apps/renovate |
| 73 | + - Select organization and grant access to repositories |
62 | 74 | - Config in `/renovate.json`: auto-merge patch updates + minor devDeps |
63 | 75 | - Why Renovate? Better grouping, scheduling, automerge than Dependabot |
64 | 76 | - Validate: `npx -p renovate -c 'renovate-config-validator'` |
65 | 77 |
|
66 | 78 | **Repository Features** (Settings → General → Features): |
67 | | - - ✅ Issues |
68 | | - - ❌ Wikis (use `docs/` instead) |
69 | | - - ⚠️ Projects, Discussions, Sponsorships (optional) |
| 79 | + - ✅ **Issues** - ENABLE |
| 80 | + - ❌ **Wikis** - DISABLE (use `docs/` folder instead) |
| 81 | + - ⚠️ **Projects** - Optional |
| 82 | + - ⚠️ **Discussions** - Optional |
| 83 | + - ⚠️ **Sponsorships** - Optional |
70 | 84 |
|
71 | 85 | 5. **Configure branch protection** (recommended): |
72 | 86 |
|
|
0 commit comments