diff --git a/.conform.yaml b/.conform.yaml new file mode 100644 index 0000000..fc9e54e --- /dev/null +++ b/.conform.yaml @@ -0,0 +1,37 @@ +policies: + - type: commit + spec: + header: + length: 89 + imperative: true + case: lower + invalidLastCharacters: . + dco: true + spellcheck: + locale: US + conventional: + types: + # build system, releases + - "build" + # changes with no functional effect (e.g. updating dependencies) + - "chore" + # GitHub Actions + - "ci" + # Documentation + - "docs" + # Unit and integration tests + - "test" + scopes: + # everything related to cargo configuration and dependencies + - "cargo" + # all current subcommands in kbs + - "import" + - "label" + - "list" + - "move" + - "prune" + - "remove" + - "shell" + - "use" + - "version" + descriptionLength: 72 diff --git a/.github/workflows/conform.yaml b/.github/workflows/conform.yaml new file mode 100644 index 0000000..174916a --- /dev/null +++ b/.github/workflows/conform.yaml @@ -0,0 +1,24 @@ +--- +name: Commit Conformance +on: + pull_request: + branches: ["main"] + +jobs: + signoff: + runs-on: ubuntu-latest + + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Setup main branch without switching current branch + run: git fetch origin main:main + + - name: Conform Action + uses: siderolabs/conform@v0.1.0-alpha.29 + with: + args: "enforce --base-branch=main" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5a15505 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing + +Thank you for considering to contribute to kubeconfig-bikeshed! Please see the following information regarding contributions. + +## License + +kubeconfig-bikeshed is licensed under [Apache-2.0](./LICENSE). + +## Developer Certificate of Origin (DCO) + +By contributing to kubeconfig-bikeshed you agree to the Developer Certificate of Origin (DCO), which has originally been created by the Linux Foundation for the Linux kernel developer community. It certifies that you have a legal right to ma. + +To sign your work, just add a line like this at the end of your commit message (this can also be done with the `--signoff` / `-S` flag): + +``` +Signed-off-by: Joe Example +``` + +By doing so you certify that you make a contribution in accordance with the [DCO](./DCO) file in this repository. + +## Conventional Commits + +This repository uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) starting from May 25, 2024. [sidero/conform](https://github.com/siderolabs/conform) is used to validate and enforce it. + +It is possible to set up a commit hook to run `conform` on commits. This is not necessary to contribute as conventional commits can be verified with any compatible tool. + +```sh +cat <