How to Contribute
We welcome contributions to the CICADA project! Whether you’re fixing a bug, adding a new feature, or improving documentation, your help is appreciated.Getting Started
- Fork the Repository: Start by forking the main CICADA repository to your own GitHub account.
- Clone Your Fork: Clone your forked repository to your local machine.
- Set Up Upstream Remote: Add the original repository as the “upstream” remote.
(Replace
original_ownerwith the actual owner of the main repository). - Install Dependencies: Ensure you have all necessary prerequisites installed (Node.js, etc.) and then run:
- Create a New Branch: Create a new branch for your changes. Choose a descriptive name (e.g.,
feat/add-user-roles,fix/login-button-bug).
Making Changes
- Code: Make your desired code changes. Follow the existing coding style and conventions.
- Testing:
- If you’re fixing a bug, try to write a test that reproduces the bug before fixing it.
- If you’re adding a new feature, write unit tests for any new API service logic.
- Ensure all existing tests pass by running
npm test.
- Linting: Ensure your code adheres to the project’s linting rules. You can run the linter with:
- Commit Your Changes: Write clear and concise commit messages.
- Keep Your Branch Updated: Periodically, rebase your branch on the latest changes from the upstream
mainbranch to avoid merge conflicts.
Submitting a Pull Request
- Push Your Branch: Push your feature branch to your forked repository on GitHub.
- Open a Pull Request (PR):
- Go to the original CICADA repository on GitHub.
- You should see a prompt to create a pull request from your recently pushed branch.
- If not, go to the “Pull requests” tab and click “New pull request”.
- Choose your forked repository’s branch to compare against the original repository’s
mainbranch.
- Describe Your PR:
- Write a clear title and description for your pull request.
- Explain the changes you’ve made and why.
- If your PR addresses an existing issue, link to it (e.g., “Closes #123”).
- Review Process:
- Project maintainers will review your PR.
- Be prepared to address any feedback or make further changes.
- The CI/CD pipeline (GitHub Actions) will run checks on your PR. Ensure these pass.
- Merge: Once your PR is approved and all checks pass, a maintainer will merge it into the
mainbranch.
Coding Guidelines (General)
- Follow the existing code style and structure.
- Write clear, readable, and maintainable code.
- Comment your code where necessary, especially for complex logic.
- Ensure your changes do not introduce breaking changes without proper discussion.
- Update documentation if your changes affect existing features or add new ones.