Appendix C — Contributing to GitHub repositories

The NHS-R Community welcomes contributions in the form of bug fixes and improvements.

C.1 Contributing workflow

If you’re new to Github and/or Markdown, Github’s own contributor’s guide provides a good overview of these topics.

To contribute:

  • Review the issue list, raise an issue if required
  • Fork this repository
  • Make changes or add new scripts
  • Commit and push to your own repository
  • Create a new pull request detailing your additions
  • Wait for pull request to be reviewed, and merged (not everyone will have permission to merge pull requests)
  • Celebrate your first step into the open source world and contribute more!

C.2 Using issues

If you spot something that needs to be changed, or would like to suggest some new content, please raise an issue.

Before raising a new issue, have a look through the existing ones in case it’s already been raised.

C.3 Pull requests and merging

  • If you have a change (or a new page) to raise, please create an issue first as there may be someone thinking of contributing something similar.

  • The main branch will be restricted to just those with access to the repository and they are asked to not commit directly as good practice.

  • For all changes you will need to create a fork, and then a pull request (click compare across forks and select your version).

Please reference the issue the pull request resolves, so it will be closed automatically.

C.4 Contributing any datasets

Particularly for packages like {NHSRdatasets}:

  • Add your dataset in the data folder, in .rda format.
    The best way to do this is with the {usethis} package with “gzip” compression: usethis::use_data(data, compress="gzip")

C.5 Contributing guidelines and etiquette

  • Preview your Markdown code to make sure the format is not broken.
  • Material, including commit messages, should be written in clear and simple English.
  • Nothing included should be confidential, private or disclose any personal or sensitive data (and that is also necessary for commits as well as code).
  • Follow the code of conduct in the repository at all times.
  • For further guidance refer to the NHS-R Way Style Guides.

When contributing any additions, the contributor certifies that they are the author, or has cited the author and is authorised to reuse/reference the material

C.6 Acknowledgements

This contributing guide is adapted from NHS Digital’s Contributor’s Guide.