This repository is configured with automated merge capabilities to streamline the development workflow. When a pull request has the `automerge` label, GitHub will automatically merge it once all required checks pass.
## How Auto-Merge Works
The auto-merge workflow (`.github/workflows/enable-automerge.yml`) automatically enables GitHub's auto-merge feature for pull requests that:
1. Have the **`automerge`** label
2. Are not in draft status
3. Meet all branch protection requirements
## Prerequisites
### Repository Settings
Ensure the following settings are configured in GitHub:
1.**Enable Auto-Merge Feature**
- Go to **Settings** → **General**
- Scroll to **Pull Requests** section
- Check ✓ **Allow auto-merge**
2.**Branch Protection Rules** (recommended)
- Go to **Settings** → **Branches**
- Add rule for `main` branch:
- ✓ Require pull request reviews before merging (at least 1)
- ✓ Require status checks to pass before merging
- Add required check: `CI / validate-and-package`
- ✓ Require branches to be up to date before merging (optional)
## Using Auto-Merge
### For Pull Request Authors
1.**Create a Pull Request**
```bash
git checkout -b feature/my-new-feature
# Make your changes
git add .
git commit -m "Add new feature"
git push origin feature/my-new-feature
```
2.**Add the `automerge` Label**
- Go to your pull request on GitHub
- Click on **Labels** in the right sidebar
- Select or create the **`automerge`** label
3.**Wait for Checks to Pass**
- The auto-merge workflow will automatically enable GitHub's auto-merge
- Once all required checks pass and reviews are approved, the PR will be merged automatically
- The branch will be deleted after merge (if configured)