Skip to content

Commit 6c98da3

Browse files
committed
init
0 parents  commit 6c98da3

File tree

12 files changed

+799
-0
lines changed

12 files changed

+799
-0
lines changed

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# The ID of your GitHub App
2+
APP_ID=
3+
WEBHOOK_SECRET=development
4+
5+
# Use `trace` to get verbose logging or `info` to show less
6+
LOG_LEVEL=debug
7+
8+
# Go to https://smee.io/new set this to the URL that you are redirected to.
9+
WEBHOOK_PROXY_URL=

.github/alain-bot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
issue:
2+
translate:
3+
replay: |
4+
Translation of this issue:
5+
---
6+
## {title}
7+
8+
{body}
9+
needReproduce:
10+
label: Need Reproduce
11+
afterLabel: Need More Info
12+
replay: |
13+
Hello @{user}. Please provide a online reproduction by forking this link https://stackblitz.com/edit/ng-alain-setup or a minimal GitHub repository.
14+
Issues labeled by `Need Reproduce` will be closed if no activities in 7 days.
15+
16+
你好 @{user}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://stackblitz.com/edit/ng-alain-setup) 创建一个 stackblitz 或者提供一个最小化的 GitHub 仓库
17+
被标记为 `Need Reproduce` 的 issue 7 天内未跟进将会被自动关闭。
18+
![](https://gw.alipayobjects.com/zos/antfincdn/y9kwg7DVCd/reproduce.gif)
19+
invalid:
20+
mark: ng-alain-issue-helper
21+
labels: Invalid
22+
replay: |
23+
Hello @{user}, your issue has been closed because it does not conform to our issue requirements.
24+
Please use the [Issue Helper](https://ng-alain.com/issue-helper/) to create an issue, thank you!
25+
26+
27+
你好 @{user},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。
28+
你可以通过 [issue 助手](https://ng-alain.com/issue-helper/#zh) 来创建 issue 以方便我们定位错误。谢谢配合!

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/yarn.lock
2+
/node_modules
3+
.env
4+
/lib

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020-present 卡色<[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Whitespace-only changes.

app.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# This is a GitHub App Manifest. These settings will be used by default when
2+
# initially configuring your GitHub App.
3+
#
4+
# NOTE: changing this file will not update your GitHub App settings.
5+
# You must visit github.com/settings/apps/your-app-name to edit them.
6+
#
7+
# Read more about configuring your GitHub App:
8+
# https://probot.github.io/docs/development/#configuring-a-github-app
9+
#
10+
# Read more about GitHub App Manifests:
11+
# https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/
12+
13+
# The list of events the GitHub App subscribes to.
14+
# Uncomment the event names below to enable them.
15+
default_events:
16+
# - check_run
17+
# - check_suite
18+
# - commit_comment
19+
# - create
20+
# - delete
21+
# - deployment
22+
# - deployment_status
23+
# - fork
24+
# - gollum
25+
# - issue_comment
26+
- issues
27+
# - label
28+
# - milestone
29+
# - member
30+
# - membership
31+
# - org_block
32+
# - organization
33+
# - page_build
34+
# - project
35+
# - project_card
36+
# - project_column
37+
# - public
38+
# - pull_request
39+
# - pull_request_review
40+
# - pull_request_review_comment
41+
# - push
42+
# - release
43+
# - repository
44+
# - repository_import
45+
# - status
46+
# - team
47+
# - team_add
48+
# - watch
49+
50+
# The set of permissions needed by the GitHub App. The format of the object uses
51+
# the permission name for the key (for example, issues) and the access type for
52+
# the value (for example, write).
53+
# Valid values are `read`, `write`, and `none`
54+
default_permissions:
55+
# Repository creation, deletion, settings, teams, and collaborators.
56+
# https://developer.github.com/v3/apps/permissions/#permission-on-administration
57+
# administration: read
58+
59+
# Checks on code.
60+
# https://developer.github.com/v3/apps/permissions/#permission-on-checks
61+
# checks: read
62+
63+
# Repository contents, commits, branches, downloads, releases, and merges.
64+
# https://developer.github.com/v3/apps/permissions/#permission-on-contents
65+
# contents: read
66+
67+
# Deployments and deployment statuses.
68+
# https://developer.github.com/v3/apps/permissions/#permission-on-deployments
69+
# deployments: read
70+
71+
# Issues and related comments, assignees, labels, and milestones.
72+
# https://developer.github.com/v3/apps/permissions/#permission-on-issues
73+
issues: write
74+
75+
# Search repositories, list collaborators, and access repository metadata.
76+
# https://developer.github.com/v3/apps/permissions/#metadata-permissions
77+
metadata: read
78+
# Retrieve Pages statuses, configuration, and builds, as well as create new builds.
79+
# https://developer.github.com/v3/apps/permissions/#permission-on-pages
80+
# pages: read
81+
# Pull requests and related comments, assignees, labels, milestones, and merges.
82+
# https://developer.github.com/v3/apps/permissions/#permission-on-pull-requests
83+
# pull_requests: read
84+
# Manage the post-receive hooks for a repository.
85+
# https://developer.github.com/v3/apps/permissions/#permission-on-repository-hooks
86+
# repository_hooks: read
87+
# Manage repository projects, columns, and cards.
88+
# https://developer.github.com/v3/apps/permissions/#permission-on-repository-projects
89+
# repository_projects: read
90+
# Retrieve security vulnerability alerts.
91+
# https://developer.github.com/v4/object/repositoryvulnerabilityalert/
92+
# vulnerability_alerts: read
93+
# Commit statuses.
94+
# https://developer.github.com/v3/apps/permissions/#permission-on-statuses
95+
# statuses: read
96+
# Organization members and teams.
97+
# https://developer.github.com/v3/apps/permissions/#permission-on-members
98+
# members: read
99+
# View and manage users blocked by the organization.
100+
# https://developer.github.com/v3/apps/permissions/#permission-on-organization-user-blocking
101+
# organization_user_blocking: read
102+
# Manage organization projects, columns, and cards.
103+
# https://developer.github.com/v3/apps/permissions/#permission-on-organization-projects
104+
# organization_projects: read
105+
# Manage team discussions and related comments.
106+
# https://developer.github.com/v3/apps/permissions/#permission-on-team-discussions
107+
# team_discussions: read
108+
# Manage the post-receive hooks for an organization.
109+
# https://developer.github.com/v3/apps/permissions/#permission-on-organization-hooks
110+
# organization_hooks: read
111+
# Get notified of, and update, content references.
112+
# https://developer.github.com/v3/apps/permissions/
113+
# organization_administration: read
114+
# The name of the GitHub App. Defaults to the name specified in package.json
115+
# name: My Probot App
116+
117+
# The homepage of your GitHub App.
118+
# url: https://example.com/
119+
120+
# A description of the GitHub App.
121+
# description: A description of my awesome app
122+
123+
# Set to true when your GitHub App is available to the public or false when it is only accessible to the owner of the app.
124+
# Default: true
125+
# public: false

now.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "alain-bot",
3+
"alias": "alain-bot",
4+
"scale": {
5+
"all": {
6+
"min": 1,
7+
"max": 2
8+
}
9+
},
10+
"env": {
11+
"LOG_LEVEL": "info",
12+
"APP_ID": "@alain-bot-app-id",
13+
"PRIVATE_KEY": "@alain-bot-private-key",
14+
"WEBHOOK_SECRET": "@alain-bot-webhook-secret"
15+
}
16+
}

package.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "alain-bot",
3+
"version": "1.0.0",
4+
"description": "NG-ALAIN Bot is a bot that helps the project by doing all kind of administrative tasks on our PR and issues.",
5+
"author": "cipchk <[email protected]>",
6+
"license": "MIT",
7+
"repository": "https://github.com/ng-alain/bot.git",
8+
"homepage": "https://github.com/ng-alain/bot",
9+
"bugs": "https://github.com/ng-alain/bot/issues",
10+
"keywords": [
11+
"probot",
12+
"github",
13+
"probot-app"
14+
],
15+
"scripts": {
16+
"build": "tsc -p tsconfig.json",
17+
"dev": "nodemon --exec \"npm start\"",
18+
"start": "probot run ./lib/index.js",
19+
"probot-config": "probot run ./lib/index.js",
20+
"lint": "standard **/*.ts --fix",
21+
"test": "jest && standard **/*.ts",
22+
"test:watch": "jest --watch --notify --notifyMode=change --coverage"
23+
},
24+
"dependencies": {
25+
"@types/uuid": "^3.4.4",
26+
"@vitalets/google-translate-api": "^2.8.0",
27+
"axios": "^0.19.0",
28+
"js-yaml": "^3.13.1",
29+
"kmp": "^0.0.3",
30+
"nock": "^10.0.0",
31+
"probot": "^7.2.0",
32+
"string-template": "^1.0.0",
33+
"uuid": "^3.3.2"
34+
},
35+
"devDependencies": {
36+
"@types/jest": "^24.0.0",
37+
"@types/js-yaml": "^3.12.1",
38+
"@types/nock": "^9.3.0",
39+
"@types/node": "^11.9.0",
40+
"@types/string-template": "^1.0.2",
41+
"eslint-plugin-typescript": "^0.14.0",
42+
"jest": "^24.0.0",
43+
"nodemon": "^1.17.2",
44+
"smee-client": "^1.0.2",
45+
"standard": "^12.0.1",
46+
"ts-jest": "^24.0.0",
47+
"typescript": "^3.3.1",
48+
"typescript-eslint-parser": "^22.0.0"
49+
},
50+
"engines": {
51+
"node": ">= 8.3.0"
52+
},
53+
"standard": {
54+
"parser": "typescript-eslint-parser",
55+
"env": [
56+
"jest"
57+
],
58+
"plugins": [
59+
"typescript"
60+
]
61+
},
62+
"jest": {
63+
"testEnvironment": "node"
64+
}
65+
}

0 commit comments

Comments
 (0)