Thanks for taking the time to contribute to eventkit!
When it comes to open source, there are many different ways to contribute, all of which are valuable. Here are a few guidelines that will help you contribute to eventkit.
- Make sure the bug wasn't already reported by searching on GitHub under Issues.
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample if applicable. If possible, use the relevant issue templates to create the issue.
- If you've encountered a security issue, please see our SECURITY.md guide for info on how to report it.
Please provide thoughtful comments and some sample code that show what you'd like to do with eventkit. It helps the conversation if you can show us how you're limited by the current API first before jumping to a conclusion about what needs to be changed and/or added.
If you need a bug fixed and nobody is fixing it, your best bet is to provide a fix for it and make a pull request. Open source code belongs to all of us, and it's all of our responsibility to push it forward.
When creating the PR in GitHub, make sure that you set the base to the correct branch. If you are submitting a PR that touches any code, this should be the dev branch. You set the base in GitHub when authoring the PR with the dropdown below the "Compare changes" heading.
Before you can contribute, you'll need to fork the repo. This will look a bit different depending on what type of contribution you are making:
- All new features, bug-fixes, or anything that touches material code should be branched off of and merged into the
devbranch. - Changes that only touch documentation should be branched off of and merged into the
mainbranch.
The following steps will get you setup to start issuing commits:
-
Fork the repo (click the Fork button at the top right of this page)
-
Clone your fork locally
# in a terminal, cd to parent directory where you want your clone to be, then git clone https://github.com/<your_github_username>/eventkit.git cd eventkit # if you are making *any* code changes, make sure to checkout the dev branch git checkout dev
All commits that fix bugs or add features should have tests. Do not merge code without tests!
All commits that add or change public APIs must also have accompanying updates to all relevant documentation and examples. PR's that don't have accompanying docs will not be merged.
Documentation is defined using static markdown files in the docs directory, and using the TypeDoc comments found in the source code. You can preview the docs site locally by running pnpm docs:dev from the root directory. Any changes you make to either the docs or source code comments will be reflected in the docs site running locally.
Once changes make their way into the main branch they will automatically be published to the docs site.
Eventkit uses a monorepo setup to host code for multiple packages. These packages live in the packages directory.
We use pnpm workspaces to manage installation of dependencies and running various scripts. To get everything installed, make sure you have pnpm installed, and then run pnpm install from the repo root.
Calling pnpm build from the root directory will run the build, which should take only a few seconds. It's important to build all the packages together because the individual packages have dependencies on one another.
Running pnpm test from the root directory will run every package's tests. If you want to run tests for a specific package, use pnpm test --projects packages/<package-name>:
# Test all packages
pnpm test
# Test only the base package
pnpm test --projects packages/eventkitWe use changesets to manage the changelog and versioning of the packages. When you make any material changes to the codebase in a PR, you should document your changes by running pnpm changeset from the root directory. Follow the prompts to add a changelog entry, and the changelog's will be updated automatically come release time.
Releases are managed by changesets and are automatically created when a PR is merged into main. When code lands in main, a new PR will open that will update the changelog and version of the packages. Once that PR is merged, a new release will be created and published to npm.
This project is a volunteer effort, and we encourage you to contribute in any way you can.
Thanks! ❤️ ❤️ ❤️