https://github.com/carmjos/mergebot
A simple python script to merge all filtered PRs in a GitHub user/org/repository.
https://github.com/carmjos/mergebot
auto-merge python script scripts
Last synced: 2 months ago
JSON representation
A simple python script to merge all filtered PRs in a GitHub user/org/repository.
- Host: GitHub
- URL: https://github.com/carmjos/mergebot
- Owner: CarmJos
- License: lgpl-3.0
- Created: 2025-02-24T06:03:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-09-12T01:20:53.000Z (9 months ago)
- Last Synced: 2026-02-23T21:57:36.128Z (4 months ago)
- Topics: auto-merge, python, script, scripts
- Language: Python
- Homepage:
- Size: 154 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MergeBot
A simple python script to merge all filtered PRs in a GitHub user/org/repository.

## Usage
1. Download the [`src/run.py`](https://raw.githubusercontent.com/CarmJos/MergeBot/refs/heads/master/src/run.py) file.
2. Install the [PyGithub](https://github.com/PyGithub/PyGithub) library.
```bash
$ pip install PyGithub tqdm colorama
```
or install the required packages from the requirements.txt file.
```bash
$ pip install -r requirements.txt
```
3. Replace `ACCESS_TOKEN` with your token in the `run.py` file.
- You can create a token at [GitHub/Profile/Tokens](https://github.com/settings/tokens).
4. Run the script with the following command:
```bash
$ python run.py [repo]
```
> [!TIP]
> You can rewrite the `def pr_filter(pr)` function to filter the PRs you want to merge.
>
> The default filter is to merge PRs that submitted by @renovate or @dependabot.
## Open Source License
This project is licensed under the [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html).