From a862810f939f6f45ef8c54a135f39cfa060875a1 Mon Sep 17 00:00:00 2001 From: Clyybber Date: Sat, 23 Sep 2023 17:07:09 +0200 Subject: [PATCH] ci: Remove comments from PR description before merging (#910) Remove HTML comments from the PR description before merging, as otherwise they can end up in the final commit message. --------- Co-authored-by: Saem Ghani --- .github/workflows/slash-command-merge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/slash-command-merge.yml b/.github/workflows/slash-command-merge.yml index e12bd2e5e41..b6f96911569 100644 --- a/.github/workflows/slash-command-merge.yml +++ b/.github/workflows/slash-command-merge.yml @@ -52,6 +52,7 @@ jobs: } let [ body, body_tail ] = pr_info.body.split(/^---\s*$/m, 2); + body = body.replace(/<\!--.*?-->/s, ""); body = body.trimEnd(); body_tail = body_tail?.trimEnd() || ''; // Only runs when the PR is still open and is not staged for merging.