We appreciate your interest in contributing to Evergit! This document outlines the process for contributing code, testing, and submitting pull requests.
- Fork the Repository
- Clone your fork to your local machine:
git clone https://github.com/<your-username>/evergit.git
- Add the original repository as an upstream remote:
git remote add upstream https://github.com/IanSkelskey/evergit.git
- Create a new branch for your changes, based on the
dev
branch:git checkout dev git pull upstream dev git checkout -b feature/your-feature-name
- Make your changes, commit them, and push the branch to your fork:
git add . git commit -m "Add your meaningful commit message here" git push origin feature/your-feature-name
- Navigate to the Pull Requests section of the Evergit repository.
- Click New Pull Request and select:
- Base branch:
dev
- Compare branch:
feature/your-feature-name
(or the branch you created)
- Base branch:
- Provide a detailed description of the changes in the pull request template and link to any related issues.
- Submit the pull request.
Before a pull request is merged into the main
branch, ensure:
- The code is fully tested and passes all checks.
- The version bump script is executed (see below).
-
Clone the repository:
git clone https://github.com/<your-username>/evergit.git cd evergit
-
Install dependencies:
npm install
-
Run the project: To execute the project locally:
npm start
-
Run a specific command: For example, to test the
commit
command:npm start commit -- -a
This project uses Jest for testing. To run all tests:
npm test
To run a specific test file:
npm test <test-file-name>
Ensure all tests pass before submitting your pull request.
To ensure consistent code formatting, use the provided Prettier script. Run the following command to format the entire codebase:
npm run format
To check for formatting issues without applying changes:
npm run format-check
Before opening a pull request into the main
branch, you must run the version bump script to increment the version number and update the changelog.
-
Run the script:
npm run version-bump -- <increment>
Replace
<increment>
with one of the following:major
: For breaking changesminor
: For new featurespatch
: For bug fixes (default if no increment is specified)
-
Commit the updated files: The script will automatically:
- Update
package.json
andpackage-lock.json
with the new version. - Update the version badge in
README.md
. - Update the version in
src/main.ts
. - Append the changelog in
CHANGELOG.md
.
After running the script, commit the changes:
git add package.json package-lock.json README.md CHANGELOG.md src/main.ts git commit -m "Bump version for release"
- Update
-
Push the updated version:
git push origin feature/your-feature-name
- Follow the existing coding style and conventions.
- Document your code where necessary.
- Ensure the code is clean and free of console logs or unnecessary comments before submitting.
If you have questions or need help, feel free to open a discussion or contact the maintainers via the issue tracker.
Thank you for contributing to Evergit!