govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Add template for pull requests to encourage better PR structure

Open romaricpascal opened this issue 1 year ago • 1 comments
trafficstars

What

Add a pull request template to the repository to guide people when raising a PR with hints about information that would be useful to provide (eg. screenshots, future works, questions that need answering), as well as reminders for code changes that might have been skipped (macro options, tests, CHANGELOG...)

Why

Consistent PR structure would help with review, especially if we nudge towards better description of what's in the PR. Reminders about tests, doc changes... would help ensure the PRs contain everything that's needed for them to be merged (and avoid extra PRs to add them).

Who needs to work on this

Developers, Tech writers

Who needs to review this

Developers, Tech writers

Done when

  • [ ] We've decided on the content for such template
  • [ ] It has been added to the repository

romaricpascal avatar Sep 16 '24 16:09 romaricpascal

Quickly browsing through recent PRs (especially those of @querkmachine which are always pretty thorough and well written), here's a base structure for discussion:

  • Logistics (optional): warning if the PR needs to wait before being merged of similar importance
  • Intro: high level description of the problem solved by the PR. Can be enough for small PRs
  • Background/Context (optional): if some context is needed to better understand the changes (eg. PR history)
  • Changes (optional): List of the changes that the PR brings
  • Thoughts (optional): Explain choices that were made in the PR and are not already described by the changes, or code/PR comments
  • Screenshots (optional): Screenshots that would help understand the changes
  • Todo (optional): If more work is needed to fully form the PR or as future work like: - questions to answer before merge - updates to make - issues to create for future work once merged
  • This PR contains
    • [ ] Tests for the changes
    • [ ] Accessibility review
    • [ ] Documentation updates (macro options, Design System guidance, Frontend docs)
    • [ ] A CHANGELOG entry
  • Closes <ISSUE_NUMBER> (optional)

romaricpascal avatar Sep 16 '24 16:09 romaricpascal