Thank you for considering contributing to [Project Name]! We welcome all kinds of contributions, including bug reports, feature requests, and code improvements.
- Fork the repository.
- Clone your forked repository:
git clone https://github.com/<your-username>/<project-name>.git
- Navigate to the project directory:
cd <project-name>
- Install dependencies:
pnpm
- Start the local server to preview and interact with the app:
pnpm dev
If you find a bug, please open an issue on GitHub Issues and include as much detail as possible. Provide steps to reproduce, expected and actual behavior, and any relevant logs.
If you have an idea for a new feature, please open an issue on GitHub Issues and describe your proposal. Explain why the feature would be useful and how it should work.
Please make sure to have created a fork of the original repository. This is where you will work in when contibuting.
-
Create a new branch for your work:
git checkout -b feat/HNG-2145-your-feature-name
- You will likely work on features, bug fixes, refactors (restructuring code without changing functionality), chores on the repo (routine tasks such as updating dependencies or changing configurations), or documentation. Each of the type of update should be used as a prefix your branch name as
feat/
,refactor/
,fix/
,chore/
, ordocs/
- For any of these updates, you will likely use a ticket or an issue. The ticket number, e.g. HNG-2145 or issue number should also be included in your branch name
- Finally, a short description for your update should follow suit. This is often taken from the ticket title
- All of this (except the ticket number acronym,
HNG
) should be written in lowercaseThus, a typical branch should look like
feat/HNG-1234-create-login-page
or likechore/remove-unused-variables
if your update has no corresponding ticket or issue (unlikely)
- You will likely work on features, bug fixes, refactors (restructuring code without changing functionality), chores on the repo (routine tasks such as updating dependencies or changing configurations), or documentation. Each of the type of update should be used as a prefix your branch name as
-
Make your changes, and commit them with descriptive messages:
git commit -m "feat: your commit message"
Commit messages also follow a similar pattern. However, there is no need to add ticket number since they can be easily tracked given the branch name. Instead, use a colon,
:
, after the type of change (feat
,fix
, etc.), a whitespace, then your commit message. In cases where you are required to add the ticket number, you may use a the parenthesis after the type of change, likefeat(HNG-1234): your commit message
Another example:
refactor: use a single state for formData
orrefactor(HNG-1234): use a single state for formData
Please notice how both branch names an commit messages use the imperative tense. The imperative tense is a command or request, which makes it clear what the commit does. i.e., "fix login issue", NOT "I fixed login issue", and NOT "fixed login issue"
- Push your branch to your forked repository:
git push origin <your-branch>
- Ensure your branch is up to date with your remote repository:
git checkout main git pull origin main git checkout <your-branch> git rebase main
You should regularly update your remote repository with changes from the [default branch of the] upstream repository
- Run tests and ensure all tests pass:
pnpm test
Make it a habit to run tests before creating pull requests.
- Submit a pull request from your branch to the upstream repository.
- In your pull request description, explain what changes you made and why.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]].
By contributing, you agree that your contributions will be licensed under the Apache License.