https://github.com/apoclyps/merged
A TUI to monitor the duration of time a pull request is opened between ready to review and merged/closed for a Github Repository.
https://github.com/apoclyps/merged
codereview github metrics tui
Last synced: 4 months ago
JSON representation
A TUI to monitor the duration of time a pull request is opened between ready to review and merged/closed for a Github Repository.
- Host: GitHub
- URL: https://github.com/apoclyps/merged
- Owner: apoclyps
- License: mit
- Created: 2023-03-24T16:11:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-02T08:21:34.000Z (4 months ago)
- Last Synced: 2025-10-02T10:18:45.302Z (4 months ago)
- Topics: codereview, github, metrics, tui
- Language: Python
- Homepage:
- Size: 212 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Merged
[](https://github.com/apoclyps/merged/actions/workflows/test.yml)



Simplify managing dependencies within an all-in-one TUI dashboard.
## How to use merged
You will need to create a GITHUB_TOKEN with permissions via [Github > Settings > Developer Settings](https://github.com/settings/tokens/new) with the `repo` permissions to read public/private repositories and and `admin:org` for `read:org` if you wish to access an organisation that is not public.
```bash
pip install merged
# your github username
export GITHUB_USER="user"
# an individual or an organisation in which the repository exists
export GITHUB_ORG="org"
# a comma separated list of repositories
export GITHUB_REPOSITORY="repo_1,repo_2"
# your personal github token
export GITHUB_TOKEN="secret"
merged check
```
### Configuration
Merged supports both .ini and .env files. Merged always searches for configuration in this order:
- Environment variables;
- Repository: ini or .env file;
- Configuration Path
- Review Defaults
The following steps are used to provide the configuration using a `.env` or `.ini` file. The configuration can be read from within the module/repository (default location set by decouple) using the `.env` file or via a location specified by an environmental variable that points to a `.ini` file located in the root of the project or in a location specified by `PATH_TO_CONFIG`.
#### Using an `.env` file within the repository
```bash
cd /home//workspace/apoclyps/merged
touch .env
echo "GITHUB_ORG=apoclyps" >> .env
echo "GITHUB_REPOSITORY=micropython-by-example" >> .env
echo "GIT_BRANCH=main" >> .env
python -m merged config
```
#### Using an `.ini` file within the repository
```bash
cd /home//workspace/apoclyps/merged
touch settings.ini
echo "[settings]\nGITHUB_ORG=apoclyps\nGITHUB_REPOSITORY=micropython-by-example\nGIT_BRANCH=main" >> settings.ini
python -m merged config
```
#### Providing a configuration path
If you wish to set the configuration path to use an `ini` or `.env` file when running the application, you can use the configuration of a specific file by supplying the path to the configuration like so:
```bash
cd /home/apoclyps/
touch settings.ini
echo "[settings]\nGITHUB_ORG=apoclyps\nGITHUB_REPOSITORY=micropython-by-example\nGIT_BRANCH=main" >> settings.ini
cd /home//workspace/apoclyps/merged
export MERGED_PATH_TO_CONFIG=/home//
python -m merged config
```
If at any time, you want to confirm your configuration reflects the file you have provided, you can use `merged config` to view what current configuration of Merged.
#### Configuring Layout
## Getting started with local development
To build and run the CLI on your host, you will need Python 3.9 or greater, pip, and virtualenv to build and run `merged`.
If you wish to publish a PR with your changes, first create a fork on Github and clone that code.
```bash
$ gh repo clone apoclyps/merged
$ cd merged
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements_dev.txt
(env)$ pip install -r requirements.txt
(env)$ python -m merged check
```
If you wish to keep a copy of Merged on your host system, you can install and run it using:
```bash
python -m venv env
source env/bin/activate
python -m pip install -e .
merged -h
```
You can run the Merged within Docker:
```bash
docker-compose build cli && docker-compose run --rm cli python -m merged check
```
To build an image and run that image with all of the necessary dependencies using the following commands:
```bash
docker-compose build cli
docker-compose run --rm cli python -m merged check
```
## Testing
A test suite has been included to ensure Merged functions correctly.
To run the entire test suite with verbose output, run the following:
```bash
make test
```
## Linting
To run individual linting steps:
```bash
make lint
```
You can also set up `pre-commit` to run the linting steps automatically during the commit phase,
the pre-commit pipeline can be set up by running the following command on the project root:
```bash
pre-commit install
```
To run all checks manually:
```bash
pre-commit run --all
```
## Contributions
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.