mirror of
https://github.com/xuexb/github-bot.git
synced 2026-01-25 14:06:59 +00:00
docs: add a used document
This commit is contained in:
parent
f21325cfa1
commit
a54c7cf3a9
26
README.md
26
README.md
@ -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
7
env
Executable 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
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user