-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: show plugin config and support edit * feat: add issue template * fix: use URLSearchParams * refactor: only computed once Co-authored-by: StarHeart <[email protected]> * ci: add noneflow --------- Co-authored-by: StarHeart <[email protected]>
- Loading branch information
1 parent
ac63c4e
commit 7fd0903
Showing
7 changed files
with
201 additions
and
5 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,36 @@ | ||
name: Bug 反馈 | ||
title: "bug: 出现异常" | ||
description: 提交 Bug 反馈以帮助我们改进代码 | ||
labels: ["bug"] | ||
body: | ||
- type: textarea | ||
id: describe | ||
attributes: | ||
label: 描述问题 | ||
description: 清晰简洁地说明问题是什么 | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: 复现步骤 | ||
description: 提供能复现此问题的详细操作步骤 | ||
placeholder: | | ||
1. 首先…… | ||
2. 然后…… | ||
3. 发生…… | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: 期望的结果 | ||
description: 清晰简洁地描述你期望发生的事情 | ||
|
||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: 截图或日志 | ||
description: 提供有助于诊断问题的任何日志和截图 |
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 @@ | ||
blank_issues_enabled: false |
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,20 @@ | ||
name: 功能建议 | ||
title: "feat: 功能描述" | ||
description: 提出关于项目新功能的想法 | ||
labels: ["enhancement"] | ||
body: | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: 希望能解决的问题 | ||
description: 在使用中遇到什么问题而需要新的功能? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: feature | ||
attributes: | ||
label: 描述所需要的功能 | ||
description: 请说明需要的功能或解决方法 | ||
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,33 @@ | ||
name: 修改插件配置项 | ||
title: "plugin: {name}" | ||
description: 修改插件测试时的配置项 | ||
labels: ["Plugin", "Config"] | ||
body: | ||
- type: input | ||
id: pypi | ||
attributes: | ||
label: PyPI 项目名 | ||
description: PyPI 项目名 | ||
placeholder: e.g. nonebot-plugin-xxx | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: module | ||
attributes: | ||
label: 插件 import 包名 | ||
description: 插件 import 包名 | ||
placeholder: e.g. nonebot_plugin_xxx | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: config | ||
attributes: | ||
label: 插件配置项 | ||
description: 插件配置项 | ||
render: dotenv | ||
placeholder: | | ||
# e.g. | ||
# KEY=VALUE | ||
# KEY2=VALUE2 |
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,75 @@ | ||
name: NoneFlow | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened, edited] | ||
pull_request_target: | ||
types: [closed] | ||
issue_comment: | ||
types: [created] | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
noneflow: | ||
runs-on: ubuntu-latest | ||
name: noneflow | ||
# do not run on forked PRs, do not run on not related issues, do not run on pr comments | ||
if: | | ||
!( | ||
( | ||
github.event.pull_request && | ||
( | ||
github.event.pull_request.head.repo.fork || | ||
!( | ||
contains(github.event.pull_request.labels.*.name, 'Plugin') || | ||
contains(github.event.pull_request.labels.*.name, 'Adapter') || | ||
contains(github.event.pull_request.labels.*.name, 'Bot') | ||
) | ||
) | ||
) || | ||
( | ||
github.event_name == 'issue_comment' && github.event.issue.pull_request | ||
) | ||
) | ||
steps: | ||
- name: Generate token | ||
id: generate-token | ||
uses: tibdex/github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_KEY }} | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
|
||
- name: Cache pre-commit hooks | ||
uses: actions/cache@v4 | ||
with: | ||
path: .cache/.pre-commit | ||
key: noneflow-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- name: NoneFlow | ||
uses: docker://ghcr.io/nonebot/noneflow:latest | ||
with: | ||
config: > | ||
{ | ||
"base": "master", | ||
"plugin_path": "assets/plugins.json5", | ||
"bot_path": "assets/bots.json5", | ||
"adapter_path": "assets/adapters.json5", | ||
"registry_repository": "nonebot/registry" | ||
} | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
PRIVATE_KEY: ${{ secrets.APP_KEY }} | ||
PRE_COMMIT_HOME: /github/workspace/.cache/.pre-commit | ||
|
||
- name: Fix permission | ||
run: sudo chown -R $(whoami):$(id -ng) .cache/.pre-commit |
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
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