Skip to content

Commit

Permalink
ci: Remove comments from PR description before merging (#910)
Browse files Browse the repository at this point in the history
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 <saemghani+github@gmail.com>
  • Loading branch information
Clyybber and saem authored Sep 23, 2023
1 parent 4abbeeb commit a862810
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/slash-command-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a862810

Please sign in to comment.