Hello! In order to facilitate code review, I decided to use a pull request template for my PRs (e.g. XWIKI-15065, XWIKI-20435). I think this is a practice that could benefit any PR (especially for those created by non-committers which will systematically go through a validation step) and that it’d be interesting to
incentivize using a common pattern that provides details on the PR.
My proposal is split in two points:
- Add a section in the documentation describing a recommended pull request template. If no better idea is found, I’ll add an hyperlink in the Jira best practice about putting a Jira reference in every PR towards a child page describing the PR template.
- Make use of the pull requests templates feature supported on Github to propose this template on new PRs for
xwiki-platform
Here is a proposal of template:
# Jira
<!--- Always put a JIRA issue reference in a commit message --->
# PR Changes
<!--- Describe the main changes brought in this PR. --->
*
# Notes
<!--- Provide extra hints to make it easier to understand the PR. Those can be:
* Explanation of choices made in this PR
* Expected backporting/cherry-picking strategy
* Anchor towards extra resources needed to understand the context of this PR. E.g. a proposal on the forum.
--->
*
# View
<!--- If this PR introduces any UI change, it's recommended to highlight it with a screenshot or screen recording. --->
# Tests
<!--- Describe how the changes provided in this PR influence test results. Especially important for regression fixes. --->
This would become on GitHub dark mode (empty then filled up template):
Of course the categories and their order would be just a recommendation and not a strict requirement.
<EDIT> This template has been updated in regards to the feedback in this discussion and is available on post n.5. </EDIT>
Do you agree with the main idea of this proposal? Do you think this template is appropriate for most PRs on xwiki-platform
? Should we add a section or remove one that is too specific?
Thanks,
Lucas C.