Before submitting your contribution, be sure to take a moment and read the following guidelines.
- Becoming a Contributor
- Code of Conduct
- Standards and Best Practices
- Tooling
- Development Setup
- Branch Creation
- Commit Convention
- Pull Request Guidelines
If you are interested to contribute to Brie project, start by reviewing pull requests. Suggest us your favorite best practices and standards that can improve our project. Your can join our small team by requesting to join the contributors team in the Discord Chat or we will reach out and ask you if you want to join or you can ask one of the current maintainers to add you.
Being a contributor is not an obligation. You can help when you have time and be less active when you don't, being busy with your projects tasks.
In order to maintain the Brie structure and guarantee code quality please use the following standards and best practices that would lead to lower code complexity and more elegant design.
- pnpm to manage packages and dependencies;
- TypeScript for type safety;
- ESLint to find and fix problems in the code;
- Prettier to format the code.
-
(Win only) When you're using Windows run this:
git config --global core.eol lf
git config --global core.autocrlf input
This will set the EOL (End of line) character to be the same as on Linux/macOS. Without this, our bash script won't work, and you will have conflicts with developers on Linux/macOS.
-
Clone the repo on your local machine;
-
Ensure your node version is >= than in
.nvmrc
file, recommend to use nvm -
Install pnpm globally:
npm install -g pnpm
(ensure your node version >= 22.12.0) -
Inside brie-extension folder run
pnpm i
command to install all dependencies; -
Change the
version
to the desired version of your extension, see UPDATE-PACKAGE-VERSIONS. -
To check if everything is working, run
pnpm dev
command in terminal.
Then, depending on the target browser:
- Run:
- Dev:
pnpm dev
(on Windows, you should run as administrator; see issue#456) - Prod:
pnpm build
- Dev:
- Open in browser -
chrome://extensions
- Check - Developer mode
- Click - Load unpacked in the upper left corner
- Select the
dist
directory from the boilerplate project
- Run:
- Dev:
pnpm dev:firefox
- Prod:
pnpm build:firefox
- Dev:
- Open in browser -
about:debugging#/runtime/this-firefox
- Click - Load Temporary Add-on... in the upper right corner
- Select the
./dist/manifest.json
file from the boilerplate project
Note
In Firefox, you load add-ons in temporary mode. That means they'll disappear after each browser close. You have to: load the add-on on every browser launch.
NOTE: Remember that these commands must be executed in the root folder of the project.
There are multiple ways how to create a branch to start the test scripts development, please follow the most preferred approach.
Method 1: Create a branch for your feature or fix using the terminal:
# Create and switch into a new feature branch created from development branch
git checkout -b feature/<ID_OF_STORY>
# Create and switch into a new fix branch created from development branch
git checkout -b fix/<ID_OF_STORY>
Method 2: Create a branch for your feature or fix using web interface: click here
Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.
When you create a commit we kindly ask you to follow the convention
<type>[(optional <scope>)]: <description>
in your commit message while using one of the following types:
feat / feature
: all changes that introduce completely new code or new features, such as adding new test cases;fix / bugfix
: changes that fix a bug (ideally you will additionally reference an issue, if present);refactor
: any code change of existing behavior in the product;docs
: changing existing or creating new documentation (i.e. README, docs for usage of a util or method usage);build
: all changes regarding the build of the software, changes to dependencies or the addition of new dependencies;ci
: all changes regarding the configuration of continuous integration (i.e. azure actions, ci system);chore
: all changes to the repository that do not fit into any of the above categories;
Example: git commit -m 'feat(job-proposals): add test scripts to submit candidate to the active job flow'
If you are interested in the detailed specification you can visit Conventional Committing or check out the Angular Commit Message Guidelines.
- The
develop
branch is basically a snapshot of the latest stable version. All development must be done in dedicated branches; - Create your pull request to the under the
develop
branch; - Make sure that there are no issues on running CI/CD pipeline;
- It is good to have multiple small commits while working on the PR. Azure Repos will squash it automatically before the merge;
- Provide a detailed description of the content in the PR;
- Add the appropriate screenshots of the tests that was touched;
- The maintainers or you will merge the changes into the
develop
branch once the pull request will be approved.
-
Create a new branch using the
develop
branch, check here the instructions. -
Create a new branch out of the
develop
branch. We follow the convention[<type>/<scope>]
.type
can be eitherdocs
,bugfix
,feature
,build
, or any other conventional commit type.scope
is just a short id that describes the scope of work or the id of story.
Example:
fix/210988
ordocs/maintenance
. -
Make and commit your changes following the commit convention.
-
Now you are good to create the pull request, that should contain a descriptive title, description and screenshots with running tests.