From 557035705bdeedf5de5b37e9cce96722def9e434 Mon Sep 17 00:00:00 2001 From: uy/sun Date: Tue, 3 Oct 2023 18:25:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugin=5Ftest):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9C=AA=E9=80=9A=E8=BF=87=E6=A0=87=E7=AD=BE=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=98=AF=E6=8F=92=E4=BB=B6=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#191)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/utils/plugin_test.py | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e558b5..8a37a523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/ ## [Unreleased] +### Fixed + +- 修复未通过标签判断是否是插件发布的问题 + ## [3.1.1] - 2023-10-02 ### Fixed diff --git a/src/utils/plugin_test.py b/src/utils/plugin_test.py index 7bec0223..913cae05 100644 --- a/src/utils/plugin_test.py +++ b/src/utils/plugin_test.py @@ -21,7 +21,6 @@ STORE_PLUGINS_URL = ( "https://raw.githubusercontent.com/nonebot/nonebot2/master/assets/plugins.json" ) - # 匹配信息的正则表达式 ISSUE_PATTERN = r"### {}\s+([^\s#].*?)(?=(?:\s+###|$))" # 插件信息 @@ -306,8 +305,8 @@ async def main(): print("议题未开启,已跳过") return - title = issue.get("title") - if not title.startswith("Plugin"): + labels = issue.get("labels", []) + if not any(label["name"] == "Plugin" for label in labels): print("议题与插件发布无关,已跳过") return