Skip to content

Commit f2c5615

Browse files
committed
docs: add a maintainers merge pr guide
1 parent ab4d11e commit f2c5615

File tree

2 files changed

+160
-126
lines changed

2 files changed

+160
-126
lines changed

src/content/docs/project/maintain.md

Lines changed: 0 additions & 126 deletions
This file was deleted.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
id: maintain
3+
title: Maintaining the project
4+
sidebar_label: Maintainer Processes
5+
---
6+
import { Aside } from '@astrojs/starlight/components';
7+
8+
This guide walks you, as a maintainer, through reviewing and merging pull
9+
requests. We've organized it to follow the typical GitHub Pull Request (PR) workflow.
10+
11+
To begin, all pull requests should come from a forked repository, not from branches in
12+
the main repo (with the exception of Dependabot security updates and
13+
all-contributor bot PRs).
14+
15+
## Before You Merge - Quick Checklist
16+
17+
Before merging any PR (except all-contributors bot PRs), make sure:
18+
19+
***CI checks are green**: All tests, linting, and link checks pass
20+
***Your branch is current**: Synced with `main` (merge or rebase)
21+
***Comments are generally resolved**: All review feedback has been addressed
22+
***Issues are linked**: Mention related issues referenced in PR description
23+
***PR has a clear description**: Follows Angular commit convention and explains changes
24+
***You have the right approvals**: See approval requirements below
25+
26+
## PR Approval Requirements
27+
28+
### No approval required
29+
30+
* **All-contributors bot PRs**: Any maintainer can merge without approval
31+
* **Dependabot PRs**: Any maintainer can merge once CI is green
32+
33+
### One approval required
34+
35+
One approval from another maintainer is sufficient for most PRs.
36+
Most PRs fall here:
37+
38+
* Documentation updates
39+
* Small bug fixes
40+
* Maintenance work
41+
* Non-breaking changes
42+
43+
### Two approvals required
44+
45+
In some cases we may want a more thorough review and multiple maintainers
46+
involved in a review.
47+
Please seek two approvals (if possible) for large or sensitive changes such as:
48+
49+
* API changes
50+
* Major refactors
51+
* Significant security fixes
52+
* Changes affecting the bot's API and our users
53+
54+
<Aside type="tip">For larger changes, please open an issue to discuss
55+
the design before submitting the PR.</Aside>
56+
57+
### Maintainer Feedback & New Issues
58+
59+
We value an fluid and agile development process here at the all-contributors bot. If you
60+
find an issue during the review that is outside the scope of the PR,
61+
please create a new issue to track it instead of blocking the PR from being
62+
merged. This allows us to keep the project moving forward and also preserves
63+
precious volunteer maintainer time.
64+
65+
If a PR is merged but you you'd like to see a follow-up PR that adjusts things,
66+
no worries, simply open an issue about that follow-up and submit a new PR, if
67+
needed.
68+
69+
## Merging PRs: Use Squash and Merge
70+
71+
Always use "Squash and Merge" when you merge a PR. Combined with angular commit
72+
conventions, squash and merge will keep our commit history clean and meaningful.
73+
### Why squash merge?
74+
75+
We use the squash-merge approach because it provides:
76+
77+
* **Clean history**: One commit per PR makes the history easy to read
78+
* **Meaningful commits**: Each commit represents a complete feature or fix
79+
* **Easy reverts**: Can revert an entire feature with one command
80+
* **Better changelogs**: Conventional commits enable automated changelog generation
81+
82+
### Format the squash commit message
83+
84+
Follow the [Conventional Commits](https://www.conventionalcommits.org/) format
85+
when writing your squash commit message and when adding new commits to a PR.
86+
87+
```none
88+
<type>(<scope>): <description>
89+
90+
[optional body]
91+
92+
[optional footer]
93+
```
94+
95+
Common types in the conventional commit spec include:
96+
97+
* `feat:`: New feature
98+
* `fix:`: Bug fix
99+
* `docs:`: Documentation changes
100+
* `style:`: Code style changes (formatting, no logic change)
101+
* `refactor:`: Code refactoring
102+
* `test:`: Adding or updating tests
103+
* `chore:`: Maintenance tasks, dependency updates
104+
105+
**Examples:**
106+
107+
```none
108+
feat(api): add support for custom headers
109+
fix(parser): handle empty strings correctly
110+
docs(readme): update installation instructions
111+
chore(deps): bump tailwindcss from 4.17.20 to 4.17.21
112+
```
113+
114+
<Aside type="tip">The scope is optional but helpful. Use it to indicate what
115+
part of the project changed (e.g., `api`, `cli`, `docs`, `tests`).</Aside>
116+
117+
## Merging Your Own PRs
118+
119+
As a maintainer, please avoid merging your own PRs when possible. Having another
120+
set of eyes review your work is good practice!
121+
122+
**If you must self-merge** (urgent/security/critical fix):
123+
124+
* Request a quick review if someone is available, OR
125+
* Leave a note in the PR explaining why you're self-merging
126+
127+
## After Merging
128+
129+
### Add contributors to the all-contributors table
130+
131+
When you merge a PR that is not yours, be sure to add the contributor using
132+
our friendly all-contributors bot ✨:
133+
134+
```none
135+
@all-contributors please add <github-username> for <contribution-roles>
136+
```
137+
138+
We ask contributors to do this themselves, but they often forget or are not
139+
comfortable doing so. Please check that they have added themselves, and if not,
140+
add them if needed! If they have added themselves be sure to merge the
141+
associated all-contributors PR!
142+
143+
<Aside type="note">
144+
If the contributor is already listed for that contribution type
145+
(e.g., they're already in the table for `bug`), you don't need to add them again.
146+
</Aside>
147+
148+
## Need Help with Reviews?
149+
150+
If you are waiting on a PR that you submitted and no one has responded or left
151+
you a review:
152+
153+
* Ping maintainers who've been active on related issues
154+
* As a last resort, ping the `@maintainers` team
155+
156+
Remember, this process helps us maintain code quality while keeping things
157+
our friendly bot's documentation and infrastructure moving forward.
158+
When in doubt, ask for a second opinion!
159+
160+
And also, be sure to always follow our [Code of Conduct](/project/code-of-conduct/).

0 commit comments

Comments
 (0)