This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/echarts-bot.git
The following commit(s) were added to refs/heads/master by this push: new c9de319 fix: skip to handle `edit` event when PR is closed. c9de319 is described below commit c9de3194ac2c6ddf709a446f17b9474df4422b63 Author: plainheart <y...@all-my-life.cn> AuthorDate: Sat Oct 8 13:19:21 2022 +0800 fix: skip to handle `edit` event when PR is closed. --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1c83430..84ed69d 100644 --- a/index.js +++ b/index.js @@ -237,9 +237,13 @@ module.exports = (/** @type {Probot} */ app) => { }); app.on(['pull_request.edited'], async context => { + const pr = context.payload.pull_request; + if (pr.state === 'closed') { + return; + } + const addLabel = []; const removeLabel = []; - const pr = context.payload.pull_request; if (pr.draft) { removeLabel.push(labelText.PR_AWAITING_REVIEW); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org