Dashboard for RepoLinter is a website to lint open source repositories for common issues. It acts as an UI for Repolinter and provide's organisation management capabilities.
- Install Docker.
- Install Sam Cli via
pip install aws-sam-cli
. - Clone this repository and cd into the api directory and run
sam local start-api
. This will let you run & test all the lambda functions locally. - Run
npm install
. - For running the static website part run
REACT_APP_ENDPOINT="http://localhost:3000" npm start
. Note this command may vary depending upon your shell type. - Navigate to http://0.0.0.0:3001/ via your preferred browser.
- Happy linting.
The only environment variable inside repolinter dashboard frontend isREACT_APP_ENDPOINT
which gets passed in while building the static website. This env variable is used to link the serveless API endpoint to our static react app.
On the serverless lambda function side. The environment variable for postgres database configuration and github auth token needs to be set up prior to deployment.
Create .env
file inside getResults/ & githubUtils/
lambda folders which are inside api/serverless
.
.env file should look like:
DB_PASSWORD=''
DB_HOST=''
DB_USERNAME=''
GITHUB_TOKEN=''
Repolinter Dashboard uses git to clone repositories from web and then scan them locally. Setting up the environment for git binaries inside lambda is already present/handled in the code. You only have include
git binaries inside ./tmp/bin/
folder.
Note: Make sure your usr/ folder includes usr/libexec/git-core
& usr/bin:
. Your absolute paths should look like:./tmp/bin/usr/libexec/git-core
.
Repolinter Dashboard also provides you the continous intergration feature where with every new changes to the repository it rescan the code and update the database. This can be done both at repository and
organisational level. setup webhooks to YOUR_SERVERLESS_ENDPOINT\hooks
. For more info on how to setup webhooks refer webhooks.
Setting up a production server in two easy steps:
- Deploy your lambda functions using
sam deploy \
--template-file template.yaml \
--stack-name <new-stack-name> \
--capabilities CAPABILITY_IAM
For more info on deployment using sam click link.
- Deploy the static website with env variable set to your Aws Api Gateway endpoint for the above lambda functions.
You can define your own linting rules. Here's how you create new rules.
Read CONTRIBUTING.md for details.
This library is licensed under the Apache 2.0 License.