diff --git a/AGENTS.md b/AGENTS.md index b93bdba..511189d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,3 +17,14 @@ Example: | `target` | `es2025` | Emitted language version | After creating or updating a file that contains prose, including Markdown files, do reading passes over it until every rule above is satisfied. Fix any violation you find, then read the file again. + +## Pull requests + +Turn on auto-merge for every pull request you open, so it merges as soon as it is approved and the checks pass. + +1. Open the pull request with `gh pr create`. +2. Run `gh pr merge --auto --merge` on it. A merge commit is the only merge method the repository allows. + +- A draft cannot have auto-merge. Mark it ready with `gh pr ready ` first, then run the command above. +- When the user asks to keep a pull request open, leave auto-merge off. If it is already on, turn it off with `gh pr merge --disable-auto`. +- Release pull requests (`chore: release X.Y.Z`) get auto-merge too. The release starts only when the maintainer pushes the `vX.Y.Z` tag on the merge commit by hand, as `CONTRIBUTING.md` describes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36cb459..a667d2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,6 +133,9 @@ Write the description in the imperative mood, such as "add scope rule". Mark a b - Link the issue it addresses. - Update the changelog and README in the same pull request. - Use a title that follows the commit convention. +- If you have write access, turn on auto-merge once the pull request is open, with `gh pr merge --auto --merge` or the "Enable auto-merge" button. It then merges as soon as it is approved and the checks pass. +- If auto-merge is off, the author merges the pull request once it is approved and the checks pass. A maintainer merges pull requests opened by a bot or by a contributor without write access. +- Update the branch when it falls behind `main`, because auto-merge waits until the branch is up to date. The update dismisses the approval, so the pull request needs a new review. ## License