-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from wenmine/ci/github-action
ci(github-action): 添加基础的github action
- Loading branch information
Showing
10 changed files
with
293 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: '🐛 Bug report' | ||
description: Create a report to help us improve Tiny Engine | ||
title: '🐛 [Bug]: ' | ||
labels: ['🐛 bug'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please fill out the following carefully in order to better fix the problem. | ||
- type: input | ||
id: Environment | ||
attributes: | ||
label: Environment | ||
description: | | ||
**Depending on your browser and operating system, websites may behave differently from one environment to another. Make sure your developers know your technical environment.** | ||
placeholder: Please browser information. | ||
validations: | ||
required: true | ||
- type: input | ||
id: node-version | ||
attributes: | ||
label: Version | ||
description: | | ||
### **Check if the issue is reproducible with the latest stable version.** | ||
You can use the command `node -v` to view it | ||
placeholder: latest | ||
validations: | ||
required: true | ||
- type: input | ||
id: tiny-vue-version | ||
attributes: | ||
label: Version | ||
description: | | ||
### **Check if the issue is reproducible with the latest stable version.** | ||
You can use the command `npm ls @opentiny/vue` to view it | ||
placeholder: latest | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: minimal-repo | ||
attributes: | ||
label: Link to minimal reproduction | ||
description: | | ||
**Provide a streamlined CodePen / CodeSandbox or GitHub repository link as much as possible. Please don't fill in a link randomly, it will only close your issue directly.** | ||
placeholder: Please Input | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduce | ||
attributes: | ||
label: Step to reproduce | ||
description: | | ||
**After the replay is turned on, what actions do we need to perform to make the bug appear? Simple and clear steps can help us locate the problem more quickly. Please clearly describe the steps of reproducing the issue. Issues without clear reproducing steps will not be repaired. If the issue marked with 'need reproduction' does not provide relevant steps within 7 days, it will be closed directly.** | ||
placeholder: Please Input | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: What is expected | ||
placeholder: Please Input | ||
- type: textarea | ||
id: actually | ||
attributes: | ||
label: What is actually happening | ||
placeholder: Please Input | ||
- type: textarea | ||
id: additional-comments | ||
attributes: | ||
label: Any additional comments (optional) | ||
description: | | ||
**Some background / context of how you ran into this bug.** | ||
placeholder: Please Input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: Questions or need help | ||
url: https://github.com/opentiny/tiny-engine/discussions | ||
about: Add this WeChat(opentiny), we will invite you to the WeChat discussion group later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: ✨ Feature Request | ||
description: Propose new features to @opentiny/tiny-engine-data-center to improve it. | ||
title: '✨ [Feature]: ' | ||
labels: ['✨ feature'] | ||
body: | ||
- type: textarea | ||
id: feature-solve | ||
attributes: | ||
label: What problem does this feature solve | ||
description: | | ||
Explain your use case, context, and rationale behind this feature request. More importantly, what is the end user experience you are trying to build that led to the need for this feature? | ||
placeholder: Please Input | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: feature-api | ||
attributes: | ||
label: What does the proposed API look like | ||
description: | | ||
Describe how you propose to solve the problem and provide code samples of how the API would work once implemented. Note that you can use Markdown to format your code blocks. | ||
placeholder: Please Input | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
English | [简体中文](https://github.com/opentiny/tiny-engine-data-center/blob/main/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md) | ||
|
||
# PR | ||
|
||
## PR Checklist | ||
|
||
Please check if your PR fulfills the following requirements: | ||
|
||
- [ ] The commit message follows our [Commit Message Guidelines](https://github.com/opentiny/tiny-engine-data-center/blob/main/CONTRIBUTING.md) | ||
- [ ] Tests for the changes have been added (for bug fixes / features) | ||
- [ ] Docs have been added / updated (for bug fixes / features) | ||
- [ ] Built its own designer, fully self-validated | ||
|
||
## PR Type | ||
|
||
What kind of change does this PR introduce? | ||
|
||
<!-- Please check the one that applies to this PR using "x". --> | ||
|
||
- [ ] Bugfix | ||
- [ ] Feature | ||
- [ ] Code style update (formatting, local variables) | ||
- [ ] Refactoring (no functional changes, no api changes) | ||
- [ ] Build related changes | ||
- [ ] CI related changes | ||
- [ ] Documentation content changes | ||
- [ ] Other... Please describe: | ||
|
||
## Background and solution | ||
<!-- | ||
1. Describe the problem and the scenario. | ||
2. New features need to be described and attached with renderings. | ||
3. Screenshots or GIFs involving UI/Interaction changes/Bugfix before and after modification are required. | ||
--> | ||
|
||
### What is the current behavior? | ||
|
||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
||
Issue Number: N/A | ||
|
||
### What is the new behavior? | ||
|
||
|
||
## Does this PR introduce a breaking change? | ||
|
||
- [ ] Yes | ||
- [ ] No | ||
|
||
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> | ||
|
||
## Other information |
52 changes: 52 additions & 0 deletions
52
.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[English](https://github.com/opentiny/tiny-engine-data-center/blob/main/.github/PULL_REQUEST_TEMPLATE.md) | 简体中文 | ||
|
||
# PR | ||
|
||
## PR Checklist | ||
|
||
请检查您的 PR 是否满足以下要求: | ||
|
||
- [ ] commit message遵循我们的[提交贡献指南](https://github.com/opentiny/tiny-engine-data-center/blob/main/CONTRIBUTING.zh-CN.md) | ||
- [ ] 添加了更改内容的测试用例(用于bugfix/功能) | ||
- [ ] 文档已添加/更新(用于bugfix/功能) | ||
- [ ] 是否构建了自己的设计器,经过了充分的自验证 | ||
|
||
## PR 类型 | ||
|
||
这个PR的类型是? | ||
|
||
- [ ] 日常 bug 修复 | ||
- [ ] 新特性支持 | ||
- [ ] 代码风格优化 | ||
- [ ] 重构 | ||
- [ ] 构建优化 | ||
- [ ] 测试用例 | ||
- [ ] 文档更新 | ||
- [ ] 分支合并 | ||
- [ ] 其他改动(请补充) | ||
|
||
|
||
## 需求背景和解决方案 | ||
|
||
<!-- | ||
1. 要解决的具体问题。 | ||
2. 新增特性,需要进行功能描述,并附上效果图。 | ||
3. 涉及UI/交互变动/Bugfix需要有修改前&修改后截图或 GIF。 | ||
--> | ||
|
||
|
||
Issue Number: N/A | ||
|
||
### 修改前 | ||
|
||
|
||
### 修改后 | ||
|
||
## 此PR是否含有 breaking change? | ||
|
||
- [ ] 是 | ||
- [ ] 否 | ||
|
||
<!-- 如果此 PR 包含breaking change,请在下面从用户角度描述具体变化和其他风险。--> | ||
|
||
## Other information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- allcontributors[bot] | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- Semver-Major | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- Semver-Minor | ||
- feature | ||
- enhancement | ||
- title: Bug Fixes 🐛 | ||
labels: | ||
- Semver-Patch | ||
- bug | ||
- title: Other Changes | ||
labels: | ||
- documentation | ||
- refactoring | ||
- unit-test | ||
- ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: AI Code Review | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: anc95/ChatGPT-CodeReview@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
LANGUAGE: Chinese | ||
OPENAI_API_ENDPOINT: https://api.openai.com/v1 | ||
MODEL: gpt-3.5-turbo | ||
MAX_TOKENS: 4096 | ||
MAX_PATCH_LENGTH: 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: 'issue-translator' | ||
on: | ||
issue_comment: | ||
types: [created] | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: usthe/[email protected] | ||
with: | ||
IS_MODIFY_TITLE: false | ||
# 非必须,决定是否需要修改issue标题内容 | ||
# 若是true,则机器人账户@Issues-translate-bot必须拥有修改此仓库issue权限。可以通过邀请@Issues-translate-bot加入仓库协作者实现。 | ||
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. | ||
# 非必须,自定义机器人翻译的前缀开始内容。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,17 +15,17 @@ When you personally use the TinyEngine and participate in many of the above cont | |
* Participate in code review. | ||
|
||
### Bug Reports | ||
If you encounter problems when using TinyEngine-data-center, please submit an issue to us. Before submitting an issue, read the related official documents carefully to check whether the issue is a defect or a function that has not been implemented. | ||
If you encounter problems when using TinyEngine Data Center, please submit an issue to us. Before submitting an issue, read the related official documents carefully to check whether the issue is a defect or a function that has not been implemented. | ||
|
||
If the issue is a defect, select the bug report template when creating a new issue. The title must comply with the defect description format. For example, [tiny-engine-data-center] cannot be refreshed. | ||
If the issue is a defect, select the bug report template when creating a new issue. The title must comply with the defect description format. For example, [TinyEngine Data Center] cannot be refreshed. | ||
|
||
To report a defect, you need to fill in the following information: | ||
|
||
* Tiny-engine-data-center and node version numbers | ||
* TinyEngine Data Center and node version numbers | ||
*Screenshots can be used to describe the defect. If an error is reported, the error information can be posted. | ||
* It is recommended that a minimum demo link be provided to reproduce the defect. | ||
|
||
If the feature is a new feature, select the Feature request template. The title complies with the format of the new feature description, for example, [tiny-engine-data-center]. | ||
If the feature is a new feature, select the Feature request template. The title complies with the format of the new feature description, for example, [TinyEngine Data Center]. | ||
|
||
For an issue of a new feature, you need to fill in the following information: | ||
|
||
|
@@ -34,20 +34,20 @@ For an issue of a new feature, you need to fill in the following information: | |
|
||
### Pull Requests | ||
|
||
Before submitting pull request, please make sure that your submission is in line with the overall plan of TinyEngine-data-center. Generally, issues that marked as bug are encouraged to submit pull requests. If you are not sure, you can create a Discussion for discussion. | ||
Before submitting pull request, please make sure that your submission is in line with the overall plan of TinyEngine Data Center . Generally, issues that marked as bug are encouraged to submit pull requests. If you are not sure, you can create a Discussion for discussion. | ||
|
||
Local startup steps: | ||
|
||
* Click Fork in the upper right corner of the TinyEngine-data-center code repository to fork the upstream repository to the personal repository. | ||
* Click Fork in the upper right corner of the tiny-engine-data-center code repository to fork the upstream repository to the personal repository. | ||
* Clone personal warehouse to local | ||
* Run npm install in the TinyEngine-data-center root directory to install the dependency. | ||
* Modify related configurations in the database.js file in the config folder in the TinyEngine-data-center root directory. | ||
* Run npm run dev in the root directory of TinyEngine-data-center to start local development. | ||
* Run npm install in the tiny-engine-data-center root directory to install the dependency. | ||
* Modify related configurations in the database.js file in the config folder in the tiny-engine-data-center root directory. | ||
* Run npm run dev in the root directory of tiny-engine-data-center to start local development. | ||
|
||
``` | ||
# username indicates the user name. Replace it before running the command. | ||
git clone [email protected]:username/tiny-engine-data-center.git | ||
cd tiny-engine | ||
cd tiny-engine-data-center | ||
git remote add upstream [email protected]:opentiny/tiny-engine-data-center.git | ||
npm i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,39 +15,39 @@ | |
* 参与代码检视 | ||
|
||
### 提交 Issue | ||
如果你在使用 TinyEngine-data-center 过程中遇到问题,欢迎给我们提交 Issue,提交 Issue 之前,请先仔细阅读相关的官方文档,确认这是一个缺陷还是尚未实现的功能。 | ||
如果你在使用 TinyEngine Data Center 过程中遇到问题,欢迎给我们提交 Issue,提交 Issue 之前,请先仔细阅读相关的官方文档,确认这是一个缺陷还是尚未实现的功能。 | ||
|
||
如果是一个缺陷,创建新 Issue 时选择 Bug report 模板,标题遵循缺陷简述 的格式,比如:[tiny-engine-data-center] 刷新功能无法使用。 | ||
如果是一个缺陷,创建新 Issue 时选择 Bug report 模板,标题遵循缺陷简述 的格式,比如:[TinyEngine Data Center] 刷新功能无法使用。 | ||
|
||
报告缺陷的 Issue 主要需要填写以下信息: | ||
|
||
* tiny-engine-data-center 和 node 的版本号 | ||
* TinyEngine Data Center 和 node 的版本号 | ||
* 缺陷的表现,可截图辅助说明,如果有报错可贴上报错信息 | ||
* 缺陷的复现步骤,最好能提供一个最小可复现 demo 链接 | ||
|
||
如果是一个新特性,则选择 Feature request 模板,标题遵循新特性简述 的格式,比如:[tiny-engine-data-center] 新增XX主题。 | ||
如果是一个新特性,则选择 Feature request 模板,标题遵循新特性简述 的格式,比如:[TinyEngine Data Center] 新增XX主题。 | ||
|
||
新特性的 Issue 主要需要填写以下信息: | ||
|
||
* 该特性主要解决用户的什么问题 | ||
* 该特性的 api 是什么样的 | ||
|
||
### 提交 PR | ||
提交 PR 之前,请先确保你提交的内容是符合 TinyEngine-data-center 整体规划的,一般已经标记为 bug 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 Discussion 进行讨论。 | ||
提交 PR 之前,请先确保你提交的内容是符合 TinyEngine Data Center 整体规划的,一般已经标记为 bug 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 Discussion 进行讨论。 | ||
|
||
本地启动步骤: | ||
|
||
* 点击 TinyEngine-data-center 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 | ||
* 点击 tiny-engine-data-center 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 | ||
* Clone 个人仓库到本地 | ||
* 在 TinyEngine-data-center 根目录下运行 npm install, 安装依赖 | ||
* 在 TinyEngine-data-center 根目录config文件夹下修改database.js中相关配置 | ||
* 在 TinyEngine-data-center 根目录下运行 npm run dev,启动本地开发 | ||
* 在 tiny-engine-data-center 根目录下运行 npm install, 安装依赖 | ||
* 在 tiny-engine-data-center 根目录config文件夹下修改database.js中相关配置 | ||
* 在 tiny-engine-data-center 根目录下运行 npm run dev,启动本地开发 | ||
|
||
|
||
``` | ||
# username 为用户名,执行前请替换 | ||
git clone [email protected]:username/tiny-engine-data-center.git | ||
cd tiny-engine | ||
cd tiny-engine-data-center | ||
git remote add upstream [email protected]:opentiny/tiny-engine-data-center.git | ||
npm i | ||
|
@@ -62,7 +62,7 @@ $ npm run dev | |
* 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并 | ||
* 提交到远程仓库:git push origin branchName | ||
* (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev | ||
* 打开 TinyEngine-data-center 代码仓库的 Pull requests 链接,点击 New pull request 按钮提交 PR | ||
* 打开 tiny-engine-data-center 代码仓库的 Pull requests 链接,点击 New pull request 按钮提交 PR | ||
* 项目 Committer 进行 Code Review,并提出意见 | ||
* PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR | ||
* 项目管理员合并 PR | ||
|