Thanks for your interest in Noda Time. We appreciate all kinds of contributions, from submitting issues to improving documentation; from writing tests to implementing new code. All help is welcome!
If you want to contribute to the codebase, you're going to need a text editor or IDE. We recommend Visual Studio Community 2017(Windows) or Visual Studio Code(Windows/Linux/macOS).
You're also going to need .NET Core SDK installed - you can download it from here.
Please make sure you have a git client installed. If you don't already have a GitHub account, please create one.
After you're all set, you can fork the project. Then you'll be able to clone your fork, so you can edit the files locally on your machine:
git clone https://github.com/YOUR-USERNAME/nodatime.git
Once you clone the repository, you'll have a remote repository (or simply remote) called origin
, that points to your forked repository on GitHub.
You'll usually want to add another remote, pointing to the original repository on GitHub. It's an acepted convention to call this remote upstream. You can do it like this:
git remote add upstream https://github.com/nodatime/nodatime.git
We have a help-wanted
label on our issue tracker to indicate tasks which new contributors can work on without much previous experience in Noda Time.
If you've found something you'd like to help with, please leave a comment in the issue.
Additionally, feel free to open an issue if you find a bug or want to suggest a feature or enhancement.
When you're ready to start working, create a new branch off the master
branch:
git checkout master
git pull upstream master
git checkout -b SOME-BRANCH-NAME
Try to use a short, descriptive name for your branch, such as add-tests-foobar-struct
.
To build everything under Visual Studio, simply open the src/NodaTime-All.sln solution file and build normally. To build with just the .NET Core SDK, run
dotnet build src/NodaTime-All.sln
The tests are currently console application projects. Simply run the following commands:
cd src/NodaTime.Test
dotnet run -f net451
dotnet run -f netcoreapp1.0
To publish your branch to your local fork, run this command from the Git Shell:
git push origin -u MY-BRANCH-NAME
When your work is finished, open a pull request against your changes.
If your pull request fixes an issue, add a comment with the word "Fixes", "Resolves" or "Closes", followed by the issue's number:
Fixes #1145
If you need to, feel free to add comments to the PR asking for suggestions or help.