Skip to content

ray5273/Github-Review-Dashboard-and-Alarm-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Github Review Dashboard

Overview

Review Dashboard Example

Review Dashboard for individual image

Review Dashboard for teams image

Admin Page Example : Repository Data image

Admin Page Example : User Data image

Review Dashboard Structure

β”œβ”€β”€ README.md 
β”œβ”€β”€ api-server 
β”‚ β”œβ”€β”€ controller 
β”‚ β”œβ”€β”€ routes 
β”‚ β”œβ”€β”€ app.ts (Express application setup) 
β”‚ β”œβ”€β”€ server.ts (Server startup script) 
β”œβ”€β”€ frontend
β”‚ β”œβ”€β”€ App.tsx (React application setup)
β”‚ β”œβ”€β”€ index.tsx (React application startup script)
β”‚ β”œβ”€β”€ components
β”œβ”€β”€ github-crawler
β”‚ β”œβ”€β”€ index.ts (Crawler startup script)
β”‚ β”œβ”€β”€ githubRestAPIRequest.ts (Github Rest API Request) 
β”œβ”€β”€ shared 
β”‚ β”œβ”€β”€ db 
β”‚ β”‚ β”œβ”€β”€ entity 
β”‚ β”‚ β”œβ”€β”€ service 
β”‚ β”œβ”€β”€ database.ts (Database setup)

Getting Started

Prerequisites

Programs

  1. Crawler
  2. API Server
  3. Frontend

How to run

installation and setup

Make sure you have installed the prerequisites.

1. clone the repository and install the dependencies

git clone https://github.com/ray5273/Github-Review-Dashboard-and-Alarm-Bot
npm install

2. Start the database

cd db_deploy
podman-compose build 
podman-compose up -d

3. Start the Grafana

cd dashboard_deploy
podman-compose build
podman-compose up -d

4. Add the following environment variables to the .env file in the root directory.

  • GITHUB_TOKEN: Github token to access the Github API
  • POSTGRES_USER: Postgres user name
  • POSTGRES_PASSWORD: Postgres password
  • POSTGRES_DB: Postgres database name
  • POSTGRES_HOST: Postgres host
  • HTTP_PROXY: HTTP proxy for the company network (optional)
  • INTERNAL_GITHUB_HOSTNAME: Github Enterprise hostname
  • INTERNAL_GITHUB_TOKEN: Github Enterprise token to access the Github API
GITHUB_TOKEN=
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
POSTGRES_HOST=
HTTPS_PROXY=
INTERNAL_GITHUB_HOSTNAME=
INTERNAL_GITHUB_TOKEN=

Run the programs

1. Run the crawler

ts-node github-crawler/src/index.ts

2. Run the api-server

API server will run on port 8080 by default.

ts-node api-server/src/server.ts

3. Run the Frontend server

Frontend server will run on port 3000 by default.

But you must set the port environment variable to 8081. which is defined in the .env file in the frontend directory.

cd frontend
npm install
npm start

4. Run the Github Alarm Webhook Bot

ts-node github-alarm-bot/src/server.ts

Plans

  • Create a new project
  • Create a crawler to get the data from Github with the following information:
    • PRs
    • Reviews
    • Comments
  • Create a dashboard to show the data
    • Select the dashboard framework or library
    • PRs
    • Reviews
    • Comments
  • Create an admin page to manage the data
    • Newly added Users
    • Newly added Repositories
    • Delete Users
    • Delete Repositories
  • Internal Repository Management
  • Create a Github bot to send the alarm message to the mattermost channel
    • Create a bot account
    • Send the alarm message to the mattermost channel

About

Github Pull Request Review Dashboard and mattermost alarm bot

Topics

Resources

Stars

Watchers

Forks