Skip to content

Latest commit

 

History

History
89 lines (53 loc) · 3.64 KB

CONTRIBUTING.md

File metadata and controls

89 lines (53 loc) · 3.64 KB

Contribution Guide

This is the common top-level contribution guide for this monorepo. A sub-package may have an additional CONTRIBUTING.md file if needed.

Legal

All contributors must sign the DCO

This is managed automatically via https://cla-assistant.io/ pull request voter.

Contributing with AI-generated code

As artificial intelligence evolves, AI-generated code is becoming valuable for many software projects, including open-source initiatives. While we recognize the potential benefits of incorporating AI-generated content into our open-source projects there are certain requirements that need to be reflected and adhered to when making contributions.

Please see our guideline for AI-generated code contributions to SAP Open Source Software Projects for these requirements.

Development Environment

pre-requisites

Initial Setup

The initial setup is trivial:

  • clone this repo
  • yarn

Commit Messages format

This project enforces the conventional-commits commit message formats. The possible commits types prefixes are limited to those defined by conventional-commit-types. This promotes a clean project history and enabled automatically generating a changelog.

The commit message format will be inspected both on a git pre-commit hook and during the central CI build and will fail the build if issues are found.

It is recommended to use git cz to construct valid conventional commit messages.

Formatting

Prettier is used to ensure consistent code formatting in this repository. This is normally transparent as it automatically activated in a pre-commit hook using lint-staged. However, this does mean that dev flows that do not use a full dev env (e.g editing directly on github) may result in voter failures due to formatting errors.

Compiling

See the respective sub-packages for instructions (if needed at all).

Testing

Mocha and Chai are used for unit-testing.

  • To run the tests, execute yarn test in a specific sub-package.
    • Note that not all sub-packages contain tests.

Full Build

To run the full Continuous Integration build run yarn ci in either the top-level package or a specific subpackage.

Release Life-Cycle

This monorepo uses Lerna's Independent mode which allows subpackages to have different versions.

Release Process

Performing a release requires push permissions to the repository.

  • Ensure you are on the default branch and synced with origin.
  • yarn run release:version
  • Follow the lerna CLI instructions.
  • Track the newly pushed commit with the message chore(release): publish in the build system for a successful completion (the Release GitHub action must be triggered!).
  • Inspect the newly published artifacts on npmjs.com.