diff --git a/.github/workflows/issue-closed.yml b/.github/workflows/issue-closed.yml index 4e03788d..b31c4ec3 100644 --- a/.github/workflows/issue-closed.yml +++ b/.github/workflows/issue-closed.yml @@ -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']