/gh-pr-viewer

Clone of https://github.com/pulls with some variations

Primary LanguageTypeScriptMIT LicenseMIT

gh-pr-viewer

Clone of https://github.com/pulls with some variations. Demo on Netlify: https://gh-pr-viewer.netlify.app/

screenshot

Using:

  • ReactJS
  • Netlify Functions
  • Github API v4
  • Primer CSS

Run

Pre-requisites

Locally

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

On Netlify

Set your environment variables for deployment with your Github OAuth App information:

  • GITHUB_CLIENT_ID: xyz
  • GITHUB_CLIENT_SECRET: abc

Notes

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.

Ref