Skip to content

Latest commit

 

History

History
146 lines (103 loc) · 7.29 KB

CONTRIBUTING.md

File metadata and controls

146 lines (103 loc) · 7.29 KB

Brie Contributing Guide

Before submitting your contribution, be sure to take a moment and read the following guidelines.

Table of content

Becoming a Contributor

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.

Standards and Best Practices

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.

Tooling

  • pnpm to manage packages and dependencies;
  • TypeScript for type safety;
  • ESLint to find and fix problems in the code;
  • Prettier to format the code.

Development Setup

  1. (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.

  2. Clone the repo on your local machine;

  3. Ensure your node version is >= than in .nvmrc file, recommend to use nvm

  4. Install pnpm globally: npm install -g pnpm (ensure your node version >= 22.12.0)

  5. Inside brie-extension folder run pnpm i command to install all dependencies;

  6. Change the version to the desired version of your extension, see UPDATE-PACKAGE-VERSIONS.

  7. To check if everything is working, run pnpm dev command in terminal.

Then, depending on the target browser:

For Chrome (Chromium-based):

  1. Run:
    • Dev: pnpm dev (on Windows, you should run as administrator; see issue#456)
    • Prod: pnpm build
  2. Open in browser - chrome://extensions
  3. Check - Developer mode
  4. Click - Load unpacked in the upper left corner
  5. Select the dist directory from the boilerplate project

For Firefox:

  1. Run:
    • Dev: pnpm dev:firefox
    • Prod: pnpm build:firefox
  2. Open in browser - about:debugging#/runtime/this-firefox
  3. Click - Load Temporary Add-on... in the upper right corner
  4. 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.

Branch Creation

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

Commit Convention

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.

Pull Request 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.

Steps to create a Pull Request

  1. Create a new branch using the develop branch, check here the instructions.

  2. Create a new branch out of the develop branch. We follow the convention [<type>/<scope>].

    • type can be either docs, 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 or docs/maintenance.

  3. Make and commit your changes following the commit convention.

  4. Now you are good to create the pull request, that should contain a descriptive title, description and screenshots with running tests.