Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.7 KB

README.md

File metadata and controls

100 lines (70 loc) · 2.7 KB

reg-suit GitHub App

CircleCI wercker status

GitHub App for reg-suit.

CONTRIBUTING

Setup for local development

Clone this repo and

$ yarn --pure-lockfile
$ yarn bootstrap

Get .pem file

You need private-key for the App.

You have 2 options to get .pem file.

1. Create App for development under your account

Go to https://github.com/settings/apps/new . And create your GitHub app so download a .pem file via "Generate a private key" button. When downloading successfully, copy the .pem file under this repository (.pem files are configured to be ignored via .gitignore).

The following figure is an example of GitHub App configurations:

Image from Gyazo

2. Contact reg-viz owner and request .pem file

If you're a member of reg-viz, I'll generate .pem file. Please contact me.

When you accept .pem file, put it under this repository.

Create .env file

$ cp .env.example .env

And edit .env file.

Run service

$ cd packages/backend
$ yarn start

Test API execution

The following cURL command comments to this PR.

curl -X POST \
  http://localhost:3000/api/comment-to-pr \
  -H 'Content-Type: application/json' \
  -d '{
	"installationId": "1454831",
	"owner": "reg-viz",
	"repository": "gh-app",
	"branchName": "pr-comment-test",
	"failedItemsCount": 0,
	"newItemsCount": 0,
	"deletedItemsCount": 0,
	"passedItemsCount": 1
}'

Run frontend

$ cd packages/frontend
$ yarn start
$ open http://localshot:4000

Run Storybook

$ cd packages/frontend
$ yarn storybook

LICENSE

MIT