GitHub have recently released slash commands, which allow you to create complex Markdown such as tables, task lists and code blocks to name a few with minimal typing and effort!
So lets dive into what commands there are and see what they can do!
Where can I use slash commands?
Slash commands can be used in description or comment fields in issues, pull requests, or discussions (where supported).
Current Slash Commands
Using the slash command is simple - just type the command in the description/comment box and then follow the prompts to create your custom markdown.
/table
Creates a markdown table. You will be prompted to choose the number of rows and columns.
/code
Creates a markdown code block. You will be prompted to choose the language for the code block, or you can select no syntax if your language is not currently supported.
/template
Shows you all the templates available within that repository for you to select and insert. This command works with issue templates and pull request templates.
/details
Creates a collapsible detail area within the description/issue. Simply add the title and content.
/savedreplies
Inserts a saved reply from your account.
If you add %cursor% to the saved reply template, the slash command will place the cursor in that spot when you insert the template. This is great for allowing you to quickly customise your template, for example adding a name etc.
/tasklist
Creates a tasklist. This command only works in issue descriptions.
As the tasklist command is currently in private beta, it may not be available to all users, unfortunately I'm one of those users, so no gif for tasklists âšī¸
Further Reading
I'd love to know in the comments if you plan to implement these commands in your workflow, or what command would you create to save time?