diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 73d7ee4a58..1b636e1879 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,9 +14,10 @@ Close # 如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。 Please include route starts with /, with all required and optional parameters. Fail to comply will result in your pull request being closed automatically. -```routes +```route /some/route /some/other/route +``` 如果你的 PR 与路由无关, 请在 route 区域 填写 `NOROUTE`,而不是直接删除 `routes` 区域。否则你的 PR 将会被无条件关闭。 If your changes are not related to route, please fill in `routes` with `NOROUTE`. Fail to comply will result in your PR being closed. --> diff --git a/scripts/workflow/test-route/identify.js b/scripts/workflow/test-route/identify.js index 380eadb7d0..4ac2cc8752 100644 --- a/scripts/workflow/test-route/identify.js +++ b/scripts/workflow/test-route/identify.js @@ -9,7 +9,7 @@ module.exports = async ({ github, context, core }, body, number) => { let res = null; const removeLabel = () => - github.issues + github.rest.issues .removeLabel({ issue_number: number, owner: context.repo.owner, @@ -23,7 +23,7 @@ module.exports = async ({ github, context, core }, body, number) => { if (whiteListedUser.includes(context.payload.sender.login)) { core.info('PR created by a whitelisted user, passing'); await removeLabel(); - await github.issues + await github.rest.issues .addLabels({ issue_number: number, owner: context.repo.owner, @@ -45,7 +45,7 @@ module.exports = async ({ github, context, core }, body, number) => { if (res.length > 0 && res[0] === 'NOROUTE') { core.info('PR stated no route, passing'); await removeLabel(); - await github.issues + await github.rest.issues .addLabels({ issue_number: number, owner: context.repo.owner, @@ -66,7 +66,7 @@ module.exports = async ({ github, context, core }, body, number) => { core.warning('seems no route found, failing'); - await github.issues + await github.rest.issues .addLabels({ issue_number: number, owner: context.repo.owner, @@ -76,7 +76,7 @@ module.exports = async ({ github, context, core }, body, number) => { .catch((e) => { core.warning(e); }); - await github.issues + await github.rest.issues .createComment({ issue_number: number, owner: context.repo.owner, @@ -87,7 +87,7 @@ Auto Route test failed, please check your PR body format and reopen pull request .catch((e) => { core.warning(e); }); - await github.pulls + await github.rest.pulls .update({ owner: context.repo.owner, repo: context.repo.repo, diff --git a/scripts/workflow/test-route/test.js b/scripts/workflow/test-route/test.js index 45e5067e94..a951b2f251 100644 --- a/scripts/workflow/test-route/test.js +++ b/scripts/workflow/test-route/test.js @@ -42,7 +42,7 @@ module.exports = async ({ github, context, core }, baseUrl, routes, number) => { `; } } - github.issues + github.rest.issues .addLabels({ issue_number: number, owner: context.repo.owner, @@ -52,7 +52,7 @@ module.exports = async ({ github, context, core }, baseUrl, routes, number) => { .catch((e) => { core.warning(e); }); - github.issues + github.rest.issues .createComment({ issue_number: number, owner: context.repo.owner,