Contributing to NRK
Contributing is easy: Fork the repository,
follow the code guidelines and best practices for that project,
make your change and send a pull request on Github!
Even though we are a Norwegian organization we do stress that contributers
communicate in English. We hope that our code is beneficial to people outside
of Norway. Below are some best practices when working with projects on Github. These are
adapted from the official Github
The LICENSE file defines the license for the project. An open source project’s license
informs users what they can and can’t do (e.g., use, modify, redistribute), and contributors,
what they are allowing others to do. There are many ways to license an open source project,
you can read more about what each license means at choosealicense.com.
At NRK we mainly use two licenses:
- MIT: A short, permissive software license. Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source. There are many variations of this license in use.
- GPL-3: You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.
Create an issue
If you find a bug in a project you’re using (and you don’t know how to fix it),
have trouble following the documentation or have a question about the project –
create an issue! There’s nothing to it and whatever issue you’re having, you’re
likely not the only one, so others will find your issue helpful too. For more
information on how issues work, check out the official Github issues
Pull Request Pro Tips
- Fork the repository and clone it locally. Connect your local to the original ‘upstream’ repository by adding it as a remote. Pull in changes from ‘upstream’ often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. See more detailed instructions here.
- Create a branch for your edits.
- Be clear about what problem is occurring and how someone can recreate that problem or why your feature will help. Then be equally as clear about the steps you took to make your changes.
- It’s best to test. Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
- Include screenshots of the before and after if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
- Contribute in the style of the project to the best of your abilities. This may mean using indents, semi colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
Open Pull Requests
Once you’ve opened a pull request a discussion will start around your proposed
changes. Other contributors and users may chime in, but ultimately the decision
is made by the maintainer(s). You may be asked to make some changes to your
pull request, if so, add more commits to your branch and push them – they’ll
automatically go into the existing pull request.