docs: add a used document

This commit is contained in:
xuexb 2017-10-15 22:10:28 +08:00
parent f21325cfa1
commit a54c7cf3a9
3 changed files with 36 additions and 1 deletions

View File

@ -65,6 +65,32 @@ feat: 添加xx功能
docs: update install info
```
## 如何使用
### 1. 创建 access tokens
<https://github.com/settings/tokens> _需要在 .env 里配置_
### 2. 创建 webhook
https://github.com/用户名/项目名/settings/hooks/new
- Payload URL: www.example.com:8000
- Content type: application/json
- trigger: Send me everything.
- Secret: xxx _需要在 .env 里配置_
### 3. run server
```
npm install
cp env .env
vim .env
npm start
```
###
## contributors
- [@yugasun](https://github.com/yugasun/)

7
env Executable file
View File

@ -0,0 +1,7 @@
# rename this file to .env
# Bot's personal access tokens, get from https://github.com/settings/tokens
GITHUB_TOKEN=token
# Webhook secret token, see https://developer.github.com/webhooks/securing/
GITHUB_SECRET_TOKEN=secret

View File

@ -3,7 +3,9 @@
"description": "Github bot",
"version": "0.0.1",
"main": "src/app.js",
"scripts": {},
"scripts": {
"start": "NODE_ENV=development node src/app"
},
"repository": {
"type": "git",
"url": "git+https://github.com/xuexb/github-bot.git"