mirror of https://github.com/layui/layui
ci(issue): 优化 issue 被关闭时的标签处理
parent
66adedff5a
commit
9d9c2787c3
|
@ -22,11 +22,12 @@ jobs:
|
|||
};
|
||||
const issue = await github.rest.issues.get(config);
|
||||
|
||||
// 是否带有 `bug` 标签
|
||||
// 是否带有 `bug`, `wontfix` 标签
|
||||
const hasBugLabel = issue.data.labels.some(label => label.name === 'bug');
|
||||
const hasWontfixLabel = issue.data.labels.some(label => label.name === 'wontfix');
|
||||
|
||||
// 对带有 `bug` 标签的 issue 追加 `resolved` 标签,表示 bug 已解决。
|
||||
if (hasBugLabel) {
|
||||
if (hasBugLabel && !hasWontfixLabel) {
|
||||
github.rest.issues.addLabels({
|
||||
...config,
|
||||
labels: ['resolved']
|
||||
|
|
Loading…
Reference in New Issue