October is here. For many GitHub repository maintainers (including me) it means the whole month of Pull Requests thanks to Hacktoberfest. This is the time when open source projects are getting a boost in contributions that help them develop new features, fix old bugs and attract new contributors.
If you plan to participate in this festival of PRs below is a couple of tips on how to make a good contribution.
Read the contributing guidelines
Many repositories will have a CONTRIBUTING.md
file that contains important information on project code style, PR review workflow, test coverage requirements, and other contributing guidelines.
Note: the actual file name may vary:
CONTRIBUTING
,CONTRIBUTE
, with or without.md
extension, could be written in lowercase as well.
If you are struggling to find this document in the repository, GitHub has a convenient link to the file on Pull Requests page:
Give a clear description of your pull request
Help the maintainer quickly understand what problem your PR is solving. If there is an existing Issue on GitHub – reference it in the Pull Request description to give some more context.
This could be a very valuable contribution, but it is hard to say from the name or (absence of) description in the PR:
Here is a good example:
Match code style of the rest of the code
This is simple but often forgotten advice. Each project has its own code style and standards. When contributing to a project, make sure your code is following the same standards even if you don't agree with them.
If a project is using tabs for code indentation and you are a radical 4-space evangelist, when contributing to this project you are expected to follow their code style (yes, tabs) even if it is not mentioned in their contributing guidelines.
Code style guidelines are designed to make code look consistent – it greatly improves its readability.
Follow Pull Request template if it exists
GitHub provides a nice feature that allows maintainers to set a template for new Pull Requests. If the project you contributing to has such a template - read it carefully and follow steps described in it before submitting your PR.
Don't give up if maintainers do not respond instantly
Maintainers could be slow in response - unfortunately, it happens (I am guilty of this myself). Hacktoberfest is a busy period for all maintainers, so leave your PR open and move on - they will get back to you, just a little bit later.
Top comments (0)