Clone of https://github.com/pulls with some variations. Demo on Netlify: https://gh-pr-viewer.netlify.app/
- ReactJS
- Netlify Functions
- Github API v4
- Primer CSS
- Netlify CLI: https://www.netlify.com/products/dev/
Create a .env
file with your Github OAuth App information:
# Environment variables for dev/local testing
GITHUB_CLIENT_ID=xyz
GITHUB_CLIENT_SECRET=abc
Run
$ npm install
$ netlify dev
Set your environment variables for deployment with your Github OAuth App information:
- GITHUB_CLIENT_ID: xyz
- GITHUB_CLIENT_SECRET: abc
Alternatively you can also setup a Personal Access Token with the following environment variable:
# Environment variables for dev/local testing
GITHUB_PAT=xyz
I recommend to use Personal Access Token for local testing. For deployment on Netlify, I would go with Client ID and Client Secret to have users authenticated with their own accounts.
- To create Github OAuth App: https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/