I need to write some comments in a GitHub PR template that will only be visible to the person who is creating (or editing) the PR, but will not be not visible on the pull request description once it's created/edited.
Is there a way to do that?
I need to write some comments in a GitHub PR template that will only be visible to the person who is creating (or editing) the PR, but will not be not visible on the pull request description once it's created/edited.
Is there a way to do that?
This is possible using HTML comments - see below. The comment will only be visible when creating or editing the PR description.
# My PRE template
My template
<!-- My private comment -->
The rest of the template
Another option would be to use a GitHub Action to scan the PR description and remove some of it via pattern matching. This GitHub Action is an example of that pattern: https://github.com/luigibertaco/dynamic-template-action
The advantage of HTML comments is that they will continue to be visible later when re-editing the PR description.
One option would be to create a test that checks the template text doesn't exists on any files.
This would be paired with a practice of PR reviews being started after all tests are passing