mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-08 11:37:56 +08:00
✨ publish to store using issue form (#2010)
This commit is contained in:
parent
a5e634319a
commit
a8b06aa7c7
57
.github/ISSUE_TEMPLATE/adapter_publish.yml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/adapter_publish.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: 发布适配器
|
||||
title: "Adapter: {name}"
|
||||
description: 发布适配器到 NoneBot 官方商店
|
||||
labels: ["Adapter"]
|
||||
body:
|
||||
- type: input
|
||||
id: name
|
||||
attributes:
|
||||
label: 适配器名称
|
||||
description: 适配器名称
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: description
|
||||
attributes:
|
||||
label: 适配器描述
|
||||
description: 适配器描述
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: pypi
|
||||
attributes:
|
||||
label: PyPI 项目名
|
||||
description: PyPI 项目名
|
||||
placeholder: e.g. nonebot-adapter-xxx
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: module
|
||||
attributes:
|
||||
label: 适配器 import 包名
|
||||
description: 适配器 import 包名
|
||||
placeholder: e.g. nonebot_adapter_xxx
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: homepage
|
||||
attributes:
|
||||
label: 适配器项目仓库/主页链接
|
||||
description: 适配器项目仓库/主页链接
|
||||
placeholder: e.g. https://github.com/xxx/xxx
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: tags
|
||||
attributes:
|
||||
label: 标签
|
||||
description: 标签
|
||||
placeholder: 'e.g. [{"label": "标签名", "color": "#ea5252"}]'
|
||||
value: "[]"
|
||||
validations:
|
||||
required: true
|
37
.github/ISSUE_TEMPLATE/bot_publish.yml
vendored
Normal file
37
.github/ISSUE_TEMPLATE/bot_publish.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: 发布机器人
|
||||
title: "Bot: {name}"
|
||||
description: 发布机器人到 NoneBot 官方商店
|
||||
labels: ["Bot"]
|
||||
body:
|
||||
- type: input
|
||||
id: name
|
||||
attributes:
|
||||
label: 机器人名称
|
||||
description: 机器人名称
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: description
|
||||
attributes:
|
||||
label: 机器人描述
|
||||
description: 机器人描述
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: homepage
|
||||
attributes:
|
||||
label: 机器人项目仓库/主页链接
|
||||
description: 机器人项目仓库/主页链接
|
||||
placeholder: e.g. https://github.com/xxx/xxx
|
||||
|
||||
- type: input
|
||||
id: tags
|
||||
attributes:
|
||||
label: 标签
|
||||
description: 标签
|
||||
placeholder: 'e.g. [{"label": "标签名", "color": "#ea5252"}]'
|
||||
value: "[]"
|
||||
validations:
|
||||
required: true
|
15
.github/ISSUE_TEMPLATE/config.yml
vendored
15
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,14 +1,5 @@
|
||||
blank_issues_enabled: true
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question
|
||||
- name: NoneBot 论坛
|
||||
url: https://discussions.nonebot.dev/
|
||||
about: Ask questions about nonebot
|
||||
- name: Plugin Publish
|
||||
url: https://v2.nonebot.dev/store
|
||||
about: Publish your plugin to nonebot homepage and nb-cli
|
||||
- name: Adapter Publish
|
||||
url: https://v2.nonebot.dev/store
|
||||
about: Publish your adapter to nonebot homepage and nb-cli
|
||||
- name: Bot Publish
|
||||
url: https://v2.nonebot.dev/store
|
||||
about: Publish your bot to nonebot homepage and nb-cli
|
||||
about: 前往 NoneBot 论坛提问
|
||||
|
57
.github/ISSUE_TEMPLATE/plugin_publish.yml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/plugin_publish.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: 发布插件
|
||||
title: "Plugin: {name}"
|
||||
description: 发布插件到 NoneBot 官方商店
|
||||
labels: ["Plugin"]
|
||||
body:
|
||||
- type: input
|
||||
id: name
|
||||
attributes:
|
||||
label: 插件名称
|
||||
description: 插件名称
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: description
|
||||
attributes:
|
||||
label: 插件描述
|
||||
description: 插件描述
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- 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: input
|
||||
id: homepage
|
||||
attributes:
|
||||
label: 插件项目仓库/主页链接
|
||||
description: 插件项目仓库/主页链接
|
||||
placeholder: e.g. https://github.com/xxx/xxx
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: tags
|
||||
attributes:
|
||||
label: 标签
|
||||
description: 标签
|
||||
placeholder: 'e.g. [{"label": "标签名", "color": "#ea5252"}]'
|
||||
value: "[]"
|
||||
validations:
|
||||
required: true
|
@ -41,42 +41,27 @@ export default function Adapter(): JSX.Element {
|
||||
const [label, setLabel] = useState<string>("");
|
||||
const [color, setColor] = useState<string>("#ea5252");
|
||||
|
||||
const urlEncode = (str: string) =>
|
||||
encodeURIComponent(str).replace(/%2B/gi, "+");
|
||||
|
||||
const onSubmit = () => {
|
||||
setModalOpen(false);
|
||||
const title = encodeURIComponent(`Adapter: ${form.name}`).replace(
|
||||
/%2B/gi,
|
||||
"+"
|
||||
);
|
||||
const body = encodeURIComponent(
|
||||
`
|
||||
**协议名称:**
|
||||
|
||||
${form.name}
|
||||
|
||||
**协议功能:**
|
||||
|
||||
${form.desc}
|
||||
|
||||
**PyPI 项目名:**
|
||||
|
||||
${form.projectLink}
|
||||
|
||||
**协议 import 包名:**
|
||||
|
||||
${form.moduleName}
|
||||
|
||||
**协议项目仓库/主页链接:**
|
||||
|
||||
${form.homepage}
|
||||
|
||||
**标签:**
|
||||
|
||||
${JSON.stringify(tags)}
|
||||
`.trim()
|
||||
).replace(/%2B/gi, "+");
|
||||
window.open(
|
||||
`https://github.com/nonebot/nonebot2/issues/new?title=${title}&body=${body}&labels=Adapter`
|
||||
);
|
||||
const queries: { key: string; value: string }[] = [
|
||||
{ key: "template", value: "adapter_publish.yml" },
|
||||
{ key: "title", value: form.name && `Adapter: ${form.name}` },
|
||||
{ key: "labels", value: "Adapter" },
|
||||
{ key: "name", value: form.name },
|
||||
{ key: "description", value: form.desc },
|
||||
{ key: "pypi", value: form.projectLink },
|
||||
{ key: "module", value: form.moduleName },
|
||||
{ key: "homepage", value: form.homepage },
|
||||
{ key: "tags", value: JSON.stringify(tags) },
|
||||
];
|
||||
const urlQueries = queries
|
||||
.filter((query) => !!query.value)
|
||||
.map((query) => `${query.key}=${urlEncode(query.value)}`)
|
||||
.join("&");
|
||||
window.open(`https://github.com/nonebot/nonebot2/issues/new?${urlQueries}`);
|
||||
};
|
||||
const onChange = (event) => {
|
||||
const target = event.target;
|
||||
|
@ -39,31 +39,25 @@ export default function Bot(): JSX.Element {
|
||||
const [label, setLabel] = useState<string>("");
|
||||
const [color, setColor] = useState<string>("#ea5252");
|
||||
|
||||
const urlEncode = (str: string) =>
|
||||
encodeURIComponent(str).replace(/%2B/gi, "+");
|
||||
|
||||
const onSubmit = () => {
|
||||
setModalOpen(false);
|
||||
const title = encodeURIComponent(`Bot: ${form.name}`).replace(/%2B/gi, "+");
|
||||
const body = encodeURIComponent(
|
||||
`
|
||||
**机器人名称:**
|
||||
|
||||
${form.name}
|
||||
|
||||
**机器人功能:**
|
||||
|
||||
${form.desc}
|
||||
|
||||
**机器人项目仓库/主页链接:**
|
||||
|
||||
${form.homepage}
|
||||
|
||||
**标签:**
|
||||
|
||||
${JSON.stringify(tags)}
|
||||
`.trim()
|
||||
).replace(/%2B/gi, "+");
|
||||
window.open(
|
||||
`https://github.com/nonebot/nonebot2/issues/new?title=${title}&body=${body}&labels=Bot`
|
||||
);
|
||||
const queries: { key: string; value: string }[] = [
|
||||
{ key: "template", value: "bot_publish.yml" },
|
||||
{ key: "title", value: form.name && `Bot: ${form.name}` },
|
||||
{ key: "labels", value: "Bot" },
|
||||
{ key: "name", value: form.name },
|
||||
{ key: "description", value: form.desc },
|
||||
{ key: "homepage", value: form.homepage },
|
||||
{ key: "tags", value: JSON.stringify(tags) },
|
||||
];
|
||||
const urlQueries = queries
|
||||
.filter((query) => !!query.value)
|
||||
.map((query) => `${query.key}=${urlEncode(query.value)}`)
|
||||
.join("&");
|
||||
window.open(`https://github.com/nonebot/nonebot2/issues/new?${urlQueries}`);
|
||||
};
|
||||
const onChange = (event) => {
|
||||
const target = event.target;
|
||||
|
@ -41,42 +41,27 @@ export default function Plugin(): JSX.Element {
|
||||
const [label, setLabel] = useState<string>("");
|
||||
const [color, setColor] = useState<string>("#ea5252");
|
||||
|
||||
const urlEncode = (str: string) =>
|
||||
encodeURIComponent(str).replace(/%2B/gi, "+");
|
||||
|
||||
const onSubmit = () => {
|
||||
setModalOpen(false);
|
||||
const title = encodeURIComponent(`Plugin: ${form.name}`).replace(
|
||||
/%2B/gi,
|
||||
"+"
|
||||
);
|
||||
const body = encodeURIComponent(
|
||||
`
|
||||
**插件名称:**
|
||||
|
||||
${form.name}
|
||||
|
||||
**插件功能:**
|
||||
|
||||
${form.desc}
|
||||
|
||||
**PyPI 项目名:**
|
||||
|
||||
${form.projectLink}
|
||||
|
||||
**插件 import 包名:**
|
||||
|
||||
${form.moduleName}
|
||||
|
||||
**插件项目仓库/主页链接:**
|
||||
|
||||
${form.homepage}
|
||||
|
||||
**标签:**
|
||||
|
||||
${JSON.stringify(tags)}
|
||||
`.trim()
|
||||
).replace(/%2B/gi, "+");
|
||||
window.open(
|
||||
`https://github.com/nonebot/nonebot2/issues/new?title=${title}&body=${body}&labels=Plugin`
|
||||
);
|
||||
const queries: { key: string; value: string }[] = [
|
||||
{ key: "template", value: "plugin_publish.yml" },
|
||||
{ key: "title", value: form.name && `Plugin: ${form.name}` },
|
||||
{ key: "labels", value: "Plugin" },
|
||||
{ key: "name", value: form.name },
|
||||
{ key: "description", value: form.desc },
|
||||
{ key: "pypi", value: form.projectLink },
|
||||
{ key: "module", value: form.moduleName },
|
||||
{ key: "homepage", value: form.homepage },
|
||||
{ key: "tags", value: JSON.stringify(tags) },
|
||||
];
|
||||
const urlQueries = queries
|
||||
.filter((query) => !!query.value)
|
||||
.map((query) => `${query.key}=${urlEncode(query.value)}`)
|
||||
.join("&");
|
||||
window.open(`https://github.com/nonebot/nonebot2/issues/new?${urlQueries}`);
|
||||
};
|
||||
const onChange = (event) => {
|
||||
const target = event.target;
|
||||
|
Loading…
Reference in New Issue
Block a user