Skip to content

Commit

Permalink
[feature] 添加 bot 支持 (sjtug#290)
Browse files Browse the repository at this point in the history
* hack: Add bot config

Signed-off-by: Ce Gao <[email protected]>

* template: Update

Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege authored Feb 11, 2018
1 parent d5a764e commit 2a28f06
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,4 @@ ehthumbs_vista.db

# Project specific
thesis.pdf
thesis-bot.yml
13 changes: 13 additions & 0 deletions hack/start-bot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e # exit on error

ROOT=$(dirname "${BASH_SOURCE}")/..

export HTTP_PORT="${HTTP_PORT:-8848}"
export HTTP_SECRET="${HTTP_SECRET:-IAMDOG}"
export POULE_GITHUB_TOKEN="${POULE_GITHUB_TOKEN:-}"

cd ${ROOT}
envsubst < hack/thesis-bot.yml.template > hack/thesis-bot.yml
poule serve --config hack/thesis-bot.yml
42 changes: 42 additions & 0 deletions hack/thesis-bot.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
http_listen: ":$HTTP_PORT"
http_secret: "$HTTP_SECRET"

token: "$POULE_GITHUB_TOKEN"

repositories:
sjtug/SJTUThesis: ""

common_configuration:
- triggers:
issues: [ edited, opened, reopened ]
pull_request: [ edited, opened, reopened ]
operations:
- type: label
settings:
patterns:
area/bachelor: ["label/bachelor","本科","学士","bachelor"]
area/master: ["label/master","研究生","硕士","master"]
area/phd: ["label/phd","博士","phd"]
area/bibliography: ["label/bibliography","bib","参考文献","reference"]
area/docs: ["label/docs","文档","docs"]
good-first-issue: ["label/good-first-issue"]
help-wanted: ["label/help-wanted"]
os/Linux: ["label/linux","linux","ubuntu","centos"]
os/macOS: ["label/macOS","苹果","apple","macOS"]
os/Windows: ["label/windows","windows"]
platform/ShareLaTeX: ["label/sharelatex","sharelatex"]
platform/TeXLive: ["label/texlive","texlive","tex live"]
priority/high: ["label/high"]
priority/low: ["label/low"]
priority/medium: ["label/medium"]
status/blocked: ["label/blocked"]
type/bug: ["label/bug","bug"]
type/discussion: ["label/discussion","discussion"]
type/enhancement: ["label/enhancement","enhancement"]
type/feature: ["label/feature","feature"]
version/0.8: ["label/0.8","0.8"]
version/0.9: ["label/0.9","0.9"]
version/0.10: ["label/0.10","0.10"]
version/1.0rc: ["label/1.0rc","1.0rc"]
status/wip: ["wip"]
status/pending-review: ["PTAL"]

0 comments on commit 2a28f06

Please sign in to comment.