Remove guide comments action (#70739)

Removes all default comments after a PR is opened (and only when it is opened).

Means that I can turn on the pr body merge option without keeping all the cruft
This commit is contained in:
Mothblocks
2022-10-30 01:46:48 -07:00
committed by GitHub
parent 79e1ef4302
commit acd034f967
2 changed files with 54 additions and 0 deletions
@@ -0,0 +1,18 @@
# Removes guide comments from PRs when opened, so that when we merge them
# and reuse the pull request description, the clutter is not left behind
name: Remove guide comments
on:
pull_request:
types: [opened]
jobs:
remove_guide_comments:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove guide comments
uses: actions/github-script@v6
with:
script: |
const { removeGuideComments } = await import('${{ github.workspace }}/tools/pull_request_hooks/removeGuideComments.js')
await removeGuideComments({ github, context })