Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 2.96 KB

CONTRIBUTING.md

File metadata and controls

93 lines (63 loc) · 2.96 KB

Contributing

Certificate of Origin

By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the DCO file for details.

Before Opening a Pull Request

Thank you for considering making a contribution to the ocm-addons plug-in. Before opening a pull request please check that the issue/feature request you are addressing is not already being worked on in any of the currently open pull requests. If it is then please feel free to contribute by testing and reviewing the changes.

Please also check for any open issues that your PR may close and be sure to link those issues in your PR description.

Testing Pull Requests Locally

To test PR's locally you must first clone this repository:

git clone [email protected]:mt-sre/ocm-addons.git

Then execute the following with the correct <PULL REQUEST NUMBER>:

PULL_REQUEST=<PULL REQUEST NUMBER>
git fetch $(curl -s https://api.github.com/repos/mt-sre/ocm-addons/pulls/${PULL_REQUEST} \
     | jq -r '(.head.repo.ssh_url) + " " + (.head.ref) + ":" + (.head.ref)')

Development

Installing pre-commit hooks

Run nix develop --command pre-commit install to install pre-commit and any configured git hooks. This will ensure that code quality is checked after every commit and also that tests are run before each push.

Running tests

To run tests on an ad-hoc basis run nix develop --command make test and when adding new packages run nix develop --command make lint to tidy modules and verfiy that they are compliant with this project's license.

Building the Plug-in

Run nix develop --command make to build the plug-in. Binaries will be located under the dist folder.

Submitting Pull Requests

First fork this repository and create a branch off of main to commit to. Commits should be named as per convential commits. When submitting your PR fill in the pull request template to the best of your abilities. If you are not a member of the mt-sre organization a member will have to leave a comment for CI to run checks against your PR so please be patient until a member can review.

Releasing

Note: releases can only be performed by members of the mt-sre organization.

Pull the latest changes from this repository to your local main branch.

git checkout main
git pull upstream main

Determine the next release version as per semver.

Then, tag the latest commit with the next release version:

git tag -a vX.Y.Z -m "release vX.Y.Z"

Finally push the tags upstream:

git push upstream --follow-tags