From f0aca100c2f684dd3cbbfa9a758a81aeeaeef848 Mon Sep 17 00:00:00 2001 From: jjeejj Date: Sat, 18 Nov 2017 22:55:04 +0800 Subject: [PATCH] Update gitment.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改第157行 由于创建label的时候的名称是不支持英文的,的,会报错422,github无法解析处理,所以此处建议替换为中文 对此不知道会不会影响其他地方的 --- src/gitment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gitment.js b/src/gitment.js index 06fe17a..77b05fb 100644 --- a/src/gitment.js +++ b/src/gitment.js @@ -154,7 +154,7 @@ class Gitment { return http.post(`/repos/${owner}/${repo}/issues`, { title, - labels: labels.concat(['gitment', id]), + labels: labels.concat(['gitment', id.replace(/,/g,',')]), //由于创建label的时候的名称是不支持英文的,的,会报错422,github无法处理,所以此处建议替换为中文 body: `${link}\n\n${desc}`, }) .then((meta) => {