Add wiki templates
What does this MR do?
It adds Wiki Templates as proposed in https://gitlab.com/gitlab-org/gitlab-ce/issues/25182 by making WikiPage a little similar to an Issuable (MergeRequest and Issue) and reusing the Issuable's templating logic existing code. As @smcgivern commented out https://gitlab.com/gitlab-org/gitlab-ce/issues/25182#note_20543250 the templates goes into the wiki's repo inside .gitlab/wiki_templates
folder.
Are there points in the code the reviewer needs to double check?
Some thoughts that crossed my mind while I was coding:
- Extracting another module (probably called Templatable) from Issuable maybe better semantically due WikiPage not being an Issuable
- Extracting copy_wiki_repo and copy_repo similarities into a better method.
- I'm pretty sure format isn't the best label for template and markdown.
Why was this MR needed?
Because it's a step to enhance built-in wiki functionality.
Screenshots
Before
After
Edit
New without template files
New with template and small
New with template and medium
New with template and large
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
-
Squashed related commits together