1
0

ticket_templates.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Templates for ticket input
  2. ==========================
  3. Pagure offers the possibility to add templates for ticket's input. These
  4. templates do not enforce anything, users will have the possibility to simply
  5. ignore it, or even to not follow it, but it also helps structuring the
  6. ticket opened against a project and highlighting the information that are
  7. often requested/needed.
  8. The templates are provided in the git repository containing the meta-data
  9. for the tickets.
  10. They must be placed under a ``templates`` folder in this git repository,
  11. end with ``.md`` and as the extension suggests can be formatted as markdown.
  12. If you create a template ``templates/default.md``, it will be shown by
  13. default when someone ask to create a new ticket.
  14. Example
  15. -------
  16. For a project named ``test`` on ``pagure.io``.
  17. * First, clone the ticket git repo [#f1]_ and move into it
  18. ::
  19. git clone ssh://git@pagure.io/tickets/test.git
  20. cd test
  21. * Create the templates folder
  22. ::
  23. mkdir templates
  24. * Create a default template
  25. ::
  26. vim templates/default.md
  27. And place in this file the following content:
  28. ::
  29. ##### Issue
  30. ##### Steps to reproduce
  31. 1.
  32. 2.
  33. 3.
  34. ##### Actual results
  35. ##### Expected results
  36. * Commit and push the changes to the git repo
  37. ::
  38. git add templates
  39. git commit -m "Add a default template for tickets"
  40. git push
  41. * And this is how it will look like
  42. .. image:: _static/pagure_ticket_template.png
  43. :target: ../_images/pagure_ticket_template.png
  44. .. [#f1] The URLs to the different git repositories can be found on the
  45. main page of the project, on the right-side menu, under the section
  46. ``Source GIT URLs``. Click on ``more`` to see them if you are logged
  47. in and have access to the repository (the ticket and request git
  48. repositories require a `commit` access or higher).