pr_custom_page.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Customize the PR page
  2. =====================
  3. Pagure offers the possibility to customize the page that creates pull-request
  4. to add your specific information, such as: please follow the XYZ coding style,
  5. run the tests or whatever you wish to inform contributors when they open a
  6. new pull-request.
  7. The customization is done via a file in the git repository containing the
  8. meta-data for the pull-requests. This file must be placed under a ``templates``
  9. folder, be named ``contributing.md`` and can be formatted as you wish using
  10. markdown.
  11. Example
  12. -------
  13. For a project named ``test`` on ``pagure.io``.
  14. * First, clone the pull-request git repo [#f1]_ and move into it
  15. ::
  16. git clone ssh://git@pagure.io/requests/test.git
  17. cd test
  18. * Create the templates folder
  19. ::
  20. mkdir templates
  21. * Create the customized PR info
  22. ::
  23. vim templates/contributing.md
  24. And place in this file the following content:
  25. ::
  26. Contributing to test
  27. ====================
  28. When creating a pull-request against test, there are couple of items to do
  29. that will speed up the review process:
  30. * Ensure the unit-tests are all passing (cf the ``runtests.sh`` script at the
  31. top level of the sources)
  32. * Check if your changes are [pep8](https://www.python.org/dev/peps/pep-0008/)
  33. compliant for this you can install ``python-pep8`` and run the ``pep8`` CLI
  34. tool
  35. * Commit and push the changes to the git repo
  36. ::
  37. git add templates
  38. git commit -m "Customize the PR page"
  39. git push
  40. * And this is how it will look like
  41. .. image:: _static/pagure_custom_pr.png
  42. :target: _static/pagure_custom_pr.png
  43. .. [#f1] All the URLs to the different git repositories can be found on the
  44. main page of the project, on the right-side menu, under the section
  45. ``Source GIT URLs``, click on ``more`` to see them.