Contributing to Circuit Parts
There are many ways to contribute to the Circuit Parts project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
After cloning and building the repo, check out the issues list. Issues labeled help wanted are good issues to submit a PR for. Issues labeled good first issue are great candidates to pick up if you are in the code for the first time. If you are contributing significant changes, or if the issue is already assigned to a specific assignee, please discuss with the assignee of the issue first before starting to work on the issue.
We would love for you to contribute to Circuit Parts and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
- Code of Conduct
- Question or Problem
- Issues and Bugs
- Security
- Feature Requests
- Developer Guide
- Submitting Guidelines
- Coding Rules
- Commit Message Guidelines
Code of Conduct
Help us keep Circuit Parts open and inclusive. Please read and follow our Code of Conduct.
Got a Question or Problem?
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on Github Discussions (opens in a new tab) channel.
Github Discussions (opens in a new tab) is a much better place to ask questions and engage in discussions since:
- Your question will be more easily discoverable by those who can help in the community.
- Questions and answers stay available for public viewing so your question / answer might help someone else.
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to our Github Discussions (opens in a new tab) channel.
Found a Bug or Issue?
If you find a bug in the source code, you can help us by submitting an issue (opens in a new tab) to our GitHub Repository (opens in a new tab). Even better, you can submit a Pull Request (opens in a new tab) with a fix.
Security
If you believe you have found a security vulnerability in the platform, we encourage you to responsibly disclose this and NOT open a public issue. We will investigate all legitimate reports. Email help@circuitparts.in to disclose any security vulnerabilities.
Feature Requests
You can request a new feature by submitting an issue (opens in a new tab) to our GitHub Repository (opens in a new tab). If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
- For a Major Feature, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
- Small Features can be crafted and directly submitted as a Pull Request (opens in a new tab).
Submitting Guidelines
Submitting an Issue
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:
- version of nextjs was used
- 3rd-party libraries and their versions
- and most importantly - a use-case that fails
A minimal reproduce scenario allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproducable scenario. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
You can file new issues by filling out our new issue form (opens in a new tab).
Submitting a Pull Request(PR)
Before you submit your Pull Request (PR) consider the following guidelines:
-
Search GitHub (opens in a new tab) for an open or closed PR that relates to your submission. You don't want to duplicate effort.
-
For the circuitparts/store (opens in a new tab) repo.
-
Follow the guidelines in our Installation document to set up your local environment for development.
-
Make your changes in a new git branch:
git checkout -b my-fix-branch main
-
Create your patch, including appropriate test cases.
-
Follow our Coding Guidelines.
-
Run the full test suite, as described in our our Installation document and ensure that all tests pass.
-
Do not commit your
package-lock.json
unless you've made changes to thepackage.json
. If you've already committedpackage-lock.json
unintentionally, please follow the steps outlined in the Guidelines for committing npm lockfile section to undo the commit. -
Commit your changes using a descriptive commit message that follows our commit message guidelines. Adherence to these conventions is necessary because release notes are automatically generated from these messages.
# example commit message
git add .
git reset -- package.lock
git commit -m "fix(content): correct minor typos in about page"
Note: the optional commit -a command line option will automatically "add" and "rm" edited files.
- Push your branch to GitHub:
git push origin my-fix-branch
-
In GitHub, send a pull request to
circuitparts/store:main
. -
If we suggest changes, then:
- Make the required updates.
- Re-run the test suite to ensure tests are still passing.
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
git rebase main -i git push origin my-fix-branch -f
That's it! Thank you for your contribution!
After your pull request is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
-
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-fix-branch
-
Check out the main branch:
git checkout main
-
Delete the local branch:
git branch -D my-fix-branch
-
Update your main with the latest upstream version:
git pull --ff upstream main