Walkthrough: Using Github’s “Saved Replies” to make life consistent and easy
Github has a functionality called “Saved Replies”, which injects prewritten text into comments, Pull Requests, basically anything formatted with a text box.
This is extremely useful when we’re trying to be consistent with formatting.
Lets add a “Saved Reply” for a consistent Pull Request format.
Creating a “Saved Reply”
On any PR, comment, or conversation on a Github repository, click a text box or start entering a comment.
The text box will open up, and in the top right, click the arrow.
In the dropdown, click “Add a Saved Reply”.
This will open up this page:
Title the reply “PR” or “Pull Request”, and add your own template for your Pull Request in markdown format. Here’s an example of what mine looks like:
## Summary
## Adds the Following- ## Reworks the Following- ## Commit Messages-
It should now look like this:
Click “Preview” to make sure that it looks correct:
Finally, if everything looks correct, click the green “Add Saved Reply” button. Congrats, you’ve got it saved! Now to put it to use.
Using Saved Replies
When opening a Pull Request and entering your description, click the same arrow in the top right:
Select your new Saved Reply
This will autofill the text box!
Now enter in details as necessary, in markdown format. Here’s an example that even uses a code block in the summary:
Click preview to make sure it looks right. This example formats to this:
Now, click “Create Pull Request”, or add comment, or whatever you decide to use this in. This feature is basically anywhere in Github code that includes a text box!