|
1 | | -1. **Review in GitHub UI**: |
| 1 | +# Maintainer Guide |
2 | 2 |
|
3 | | - - Check "Files changed" tab. |
4 | | - - Comment on lines if needed. |
5 | | - - Approve or request changes. |
| 3 | +This guide is for maintainers with write access to the repository. |
6 | 4 |
|
7 | | -2. **Check out the PR locally (optional)**: |
8 | | - If you want to test it locally: |
| 5 | +**Key difference from contributors:** You can create branches directly in the main repository instead of forking. |
9 | 6 |
|
10 | | - ```bash |
11 | | - gh pr checkout <PR-number> |
12 | | - ``` |
| 7 | +## Branch Naming Patterns |
13 | 8 |
|
14 | | -3. **Merge strategy:** |
| 9 | +Based on existing branches in the repository: |
15 | 10 |
|
16 | | -- Use Squash and Merge to keep history clean. |
17 | | -- Optionally delete the contributor’s branch (GitHub asks this by default). |
| 11 | +- `feature/` - New features (e.g., `feature/dark-mode`, `feature/navbar`) |
| 12 | +- `chore/` - Maintenance tasks (e.g., `chore/switch-to-pnpm`, `chore/organize-files`) |
| 13 | +- `docs/` - Documentation updates (e.g., `docs/update-readme-and-package-metadata`) |
| 14 | +- `Issue-##` - Issue-specific work (e.g., `Issue-10`, `Issue-67`) |
18 | 15 |
|
19 | | ---- |
| 16 | +**Creating a branch:** |
| 17 | +```bash |
| 18 | +git checkout main |
| 19 | +git pull origin main |
| 20 | +git checkout -b <type>/<descriptive-name> |
| 21 | +``` |
20 | 22 |
|
21 | | -### 🔁 If the Contributor Will Submit More Work |
| 23 | +## Creating Pull Requests |
22 | 24 |
|
23 | | -- Remind them to: |
24 | | - - Create a new branch for each PR. |
25 | | - - Keep their fork synced regularly. |
| 25 | +Create PRs for changes using GitHub CLI: |
26 | 26 |
|
27 | | ---- |
| 27 | +```bash |
| 28 | +# Push your branch |
| 29 | +git push -u origin <your-branch-name> |
28 | 30 |
|
29 | | -### 🧪 Optional: Automation Tools to Consider |
| 31 | +# Create PR (uses PR template) |
| 32 | +gh pr create --title "Your PR title" --fill |
| 33 | +``` |
30 | 34 |
|
31 | | -- GitHub Actions – for linting, testing, or builds. |
32 | | -- PR Labelers – auto-label PRs. |
33 | | -- CODEOWNERS – assign reviewers automatically. |
| 35 | +## Reviewing Pull Requests |
| 36 | + |
| 37 | +### 1. Review in GitHub UI |
| 38 | + |
| 39 | +- Check the **"Files changed"** tab |
| 40 | +- Comment on lines if needed |
| 41 | +- Approve or request changes |
| 42 | + |
| 43 | +### 2. Check out PR locally (optional) |
| 44 | + |
| 45 | +If you want to test it locally: |
| 46 | + |
| 47 | +```bash |
| 48 | +gh pr checkout <PR-number> |
| 49 | +``` |
| 50 | + |
| 51 | +### 3. Merge Strategy |
| 52 | + |
| 53 | +- Use **Squash and Merge** to keep history clean |
| 54 | +- Optionally delete the contributor's branch (GitHub prompts by default) |
| 55 | + |
| 56 | +## If a Contributor Will Submit More Work |
| 57 | + |
| 58 | +Remind them to: |
| 59 | +- Create a new branch for each PR |
| 60 | +- Keep their fork synced regularly |
| 61 | + |
| 62 | +## Optional: Automation Tools to Consider |
| 63 | + |
| 64 | +- GitHub Actions – for linting, testing, or builds |
| 65 | +- PR Labelers – auto-label PRs |
| 66 | +- CODEOWNERS – assign reviewers automatically |
0 commit comments