PulsePR is an automated tool designed to streamline the process of monitoring open pull requests on GitHub repositories and sending notifications to a designated Slack channel. Built within a Docker container, this bot offers flexible configuration options, making it suitable for teams of varying sizes and requirements. It supports username mapping to Slack names and allows scheduling notifications based on different time zones. This bot is perfect for developers and teams who aim to improve visibility and management of pull requests, thus enhancing collaboration and speeding up the code review process.
- Docker
- Slack
- Clone this repository:
git clone https://github.com/your-username/PulsePR.git
- Navigate to the project directory:
cd PulsePR
- Copy the example environment file:
cp ./src/.env.example ./src/.env
cp ./src/usernameMapping.json.example ./src/usernameMapping.json
- Open the
./src/.env
and./src/usernameMapping.json
file in a text editor and provide your GitHub and Slack configuration details.
Provide appropriate values for the following environment variables:
GITHUB_REPO=RepoUser\\Name-To-Repo-To-Monitor
GITHUB_TOKEN=abc_123
SLACK_WEBHOOK_URL=https://hooks.slack.com/myWebhook
DEBUG_MODE=false
Open usernameMapping.json
and populate it as shown below:
{
"githubUsername": "Slack Name"
}
The default timezone for the Docker container is set to UTC.
Build the Docker image:
docker build -t pulsepr .
You can run the bot as follows:
docker run --rm -d pulsepr
To test the bot locally:
docker run --rm -it pulsepr
For production:
docker run --rm -d pulsepr
You can view logs by executing:
docker logs <container-id>